blob: a7b976a2fd55dbdb7b8828ac621dfb7291513f86 [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#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://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
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$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'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://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
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
Benjamin Petersoned4aa832016-09-05 17:44:18 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersoned4aa832016-09-05 17:44:18 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002333It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# 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 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$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 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Trent Nelson5595ab52012-10-17 04:47:31 -04002683if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002684 # If we're building out-of-tree, we need to make sure the following
2685 # resources get picked up before their $srcdir counterparts.
2686 # Objects/ -> typeslots.inc
2687 # Include/ -> Python-ast.h, graminit.h
2688 # Python/ -> importlib.h
2689 # (A side effect of this is that these resources will automatically be
2690 # regenerated when building out-of-tree, regardless of whether or not
2691 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2692 # off.)
2693 BASECPPFLAGS="-IObjects -IInclude -IPython"
2694else
2695 BASECPPFLAGS=""
2696fi
2697
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002698
2699
2700
2701
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002702if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703then
2704# Extract the first word of "hg", so it can be a program name with args.
2705set dummy hg; ac_word=$2
2706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002708if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709 $as_echo_n "(cached) " >&6
2710else
2711 if test -n "$HAS_HG"; then
2712 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2713else
2714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715for as_dir in $PATH
2716do
2717 IFS=$as_save_IFS
2718 test -z "$as_dir" && as_dir=.
2719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 ac_cv_prog_HAS_HG="found"
2722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723 break 2
2724 fi
2725done
2726 done
2727IFS=$as_save_IFS
2728
2729 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2730fi
2731fi
2732HAS_HG=$ac_cv_prog_HAS_HG
2733if test -n "$HAS_HG"; then
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2735$as_echo "$HAS_HG" >&6; }
2736else
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2738$as_echo "no" >&6; }
2739fi
2740
2741
2742else
2743HAS_HG=no-repository
2744fi
2745if test $HAS_HG = found
2746then
2747 HGVERSION="hg id -i \$(srcdir)"
2748 HGTAG="hg id -t \$(srcdir)"
2749 HGBRANCH="hg id -b \$(srcdir)"
2750else
2751 HGVERSION=""
2752 HGTAG=""
2753 HGBRANCH=""
2754fi
2755
2756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
2759
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002760ac_aux_dir=
2761for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2762 if test -f "$ac_dir/install-sh"; then
2763 ac_aux_dir=$ac_dir
2764 ac_install_sh="$ac_aux_dir/install-sh -c"
2765 break
2766 elif test -f "$ac_dir/install.sh"; then
2767 ac_aux_dir=$ac_dir
2768 ac_install_sh="$ac_aux_dir/install.sh -c"
2769 break
2770 elif test -f "$ac_dir/shtool"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/shtool install -c"
2773 break
2774 fi
2775done
2776if test -z "$ac_aux_dir"; then
2777 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2778fi
2779
2780# These three variables are undocumented and unsupported,
2781# and are intended to be withdrawn in a future Autoconf release.
2782# They can cause serious problems if a builder's source tree is in a directory
2783# whose full name contains unusual characters.
2784ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2785ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2786ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2787
2788
2789# Make sure we can run config.sub.
2790$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2791 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2792
2793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2794$as_echo_n "checking build system type... " >&6; }
2795if ${ac_cv_build+:} false; then :
2796 $as_echo_n "(cached) " >&6
2797else
2798 ac_build_alias=$build_alias
2799test "x$ac_build_alias" = x &&
2800 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2801test "x$ac_build_alias" = x &&
2802 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2803ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2804 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2805
2806fi
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2808$as_echo "$ac_cv_build" >&6; }
2809case $ac_cv_build in
2810*-*-*) ;;
2811*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2812esac
2813build=$ac_cv_build
2814ac_save_IFS=$IFS; IFS='-'
2815set x $ac_cv_build
2816shift
2817build_cpu=$1
2818build_vendor=$2
2819shift; shift
2820# Remember, the first character of IFS is used to create $*,
2821# except with old shells:
2822build_os=$*
2823IFS=$ac_save_IFS
2824case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2825
2826
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2828$as_echo_n "checking host system type... " >&6; }
2829if ${ac_cv_host+:} false; then :
2830 $as_echo_n "(cached) " >&6
2831else
2832 if test "x$host_alias" = x; then
2833 ac_cv_host=$ac_cv_build
2834else
2835 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2836 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2837fi
2838
2839fi
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2841$as_echo "$ac_cv_host" >&6; }
2842case $ac_cv_host in
2843*-*-*) ;;
2844*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2845esac
2846host=$ac_cv_host
2847ac_save_IFS=$IFS; IFS='-'
2848set x $ac_cv_host
2849shift
2850host_cpu=$1
2851host_vendor=$2
2852shift; shift
2853# Remember, the first character of IFS is used to create $*,
2854# except with old shells:
2855host_os=$*
2856IFS=$ac_save_IFS
2857case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2858
2859
2860
doko@python.orga10e4a92013-01-25 18:45:12 +01002861
2862
Ned Deilyfcbc2462014-08-22 13:32:49 -07002863# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2864rm -f pybuilddir.txt
2865
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002866for ac_prog in python$PACKAGE_VERSION python3 python
2867do
2868 # Extract the first word of "$ac_prog", so it can be a program name with args.
2869set dummy $ac_prog; ac_word=$2
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2871$as_echo_n "checking for $ac_word... " >&6; }
2872if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2873 $as_echo_n "(cached) " >&6
2874else
2875 if test -n "$PYTHON_FOR_GEN"; then
2876 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2877else
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881 IFS=$as_save_IFS
2882 test -z "$as_dir" && as_dir=.
2883 for ac_exec_ext in '' $ac_executable_extensions; do
2884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2885 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2887 break 2
2888 fi
2889done
2890 done
2891IFS=$as_save_IFS
2892
2893fi
2894fi
2895PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2896if test -n "$PYTHON_FOR_GEN"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2898$as_echo "$PYTHON_FOR_GEN" >&6; }
2899else
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
2902fi
2903
2904
2905 test -n "$PYTHON_FOR_GEN" && break
2906done
2907test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2908
2909if test "$PYTHON_FOR_GEN" = not-found; then
2910 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2911 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2912 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2913fi
2914
2915
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002916if test "$cross_compiling" = yes; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2918$as_echo_n "checking for python interpreter for cross build... " >&6; }
2919 if test -z "$PYTHON_FOR_BUILD"; then
2920 for interp in python$PACKAGE_VERSION python3 python; do
2921 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002922 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 +02002923 break
2924 fi
2925 interp=
2926 done
2927 if test x$interp = x; then
2928 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2931$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002932 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 +02002933 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002934 # Used to comment out stuff for rebuilding generated files
2935 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002940 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Martin Pantereac67be2016-07-28 01:28:27 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002960VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990
2991
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2994# them.
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997
2998
2999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003002# Arguments passed to configure.
3003
3004CONFIG_ARGS="$ac_configure_args"
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3007$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003009if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003010 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011 case $enableval in
3012 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 # Locate the best usable SDK, see Mac/README.txt for more
3014 # information
3015 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003016 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3019 if test ! -d "${enableval}"
3020 then
3021 enableval=/
3022 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ;;
3025 esac
3026 case $enableval in
3027 no)
3028 UNIVERSALSDK=
3029 enable_universalsdk=
3030 ;;
3031 *)
3032 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 if test ! -d "${UNIVERSALSDK}"
3034 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003035 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041else
3042
3043 UNIVERSALSDK=
3044 enable_universalsdk=
3045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048if test -n "${UNIVERSALSDK}"
3049then
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3051$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052else
Matthias Kloseb9621712010-04-24 17:59:49 +00003053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deily87adb6e2013-10-18 21:09:56 -07003059ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003060
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061# For backward compatibility reasons we prefer to select '32-bit' if available,
3062# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064if test "`uname -s`" = "Darwin"
3065then
3066 if test -n "${UNIVERSALSDK}"
3067 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069 then
3070 UNIVERSAL_ARCHS="intel"
3071 fi
3072 fi
3073fi
3074
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3077$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078
3079# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003080if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 UNIVERSAL_ARCHS="$withval"
3083
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084fi
3085
Ned Deily87adb6e2013-10-18 21:09:56 -07003086if test -n "${UNIVERSALSDK}"
3087then
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3089$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3090else
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
3093fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095
3096# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003097if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003098 withval=$with_framework_name;
3099 PYTHONFRAMEWORK=${withval}
3100 PYTHONFRAMEWORKDIR=${withval}.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3102
3103else
3104
3105 PYTHONFRAMEWORK=Python
3106 PYTHONFRAMEWORKDIR=Python.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3108
3109fi
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003114 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003116 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 esac
3118 case $enableval in
3119 no)
3120 PYTHONFRAMEWORK=
3121 PYTHONFRAMEWORKDIR=no-framework
3122 PYTHONFRAMEWORKPREFIX=
3123 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124 FRAMEWORKINSTALLFIRST=
3125 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 FRAMEWORKALTINSTALLFIRST=
3127 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003128 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003129 if test "x${prefix}" = "xNONE"; then
3130 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3131 else
3132 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3133 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003135 ;;
3136 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003140 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3142 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003143 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 if test "x${prefix}" = "xNONE" ; then
3147 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003149 else
3150 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3151 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
3153 case "${enableval}" in
3154 /System*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 if test "${prefix}" = "NONE" ; then
3157 # See below
3158 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3159 fi
3160 ;;
3161
3162 /Library*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 ;;
3165
3166 */Library/Frameworks)
3167 MDIR="`dirname "${enableval}"`"
3168 MDIR="`dirname "${MDIR}"`"
3169 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3170
3171 if test "${prefix}" = "NONE"; then
3172 # User hasn't specified the
3173 # --prefix option, but wants to install
3174 # the framework in a non-default location,
3175 # ensure that the compatibility links get
3176 # installed relative to that prefix as well
3177 # instead of in /usr/local.
3178 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3179 fi
3180 ;;
3181
3182 *)
3183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3184 ;;
3185 esac
3186
Jack Jansen127e56e2001-09-11 14:41:54 +00003187 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3196
3197 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3198
Jack Jansene578a632001-08-15 01:27:14 +00003199 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum563e7081996-09-10 18:20:48 +00003201else
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003205 PYTHONFRAMEWORKPREFIX=
3206 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207 FRAMEWORKINSTALLFIRST=
3208 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 FRAMEWORKALTINSTALLFIRST=
3210 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003211 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3214 else
3215 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3216 fi
Jack Jansene578a632001-08-15 01:27:14 +00003217 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
3223
Michael W. Hudson54241132001-12-07 15:38:26 +00003224
3225
3226
3227
Jack Jansene578a632001-08-15 01:27:14 +00003228
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003229
3230
3231
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003232
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003233
Ned Deilyb8f944f2013-11-21 22:42:25 -08003234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
3251 *-*-linux*)
3252 ac_sys_system=Linux
3253 ;;
3254 *-*-cygwin*)
3255 ac_sys_system=Cygwin
3256 ;;
3257 *)
3258 # for now, limit cross builds to known configurations
3259 MACHDEP="unknown"
3260 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3261 esac
3262 ac_sys_release=
3263 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003264 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003265 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003266 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 fi
3272 ac_md_system=`echo $ac_sys_system |
3273 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3274 ac_md_release=`echo $ac_sys_release |
3275 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3276 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003277
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003279 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003280 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003281 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003282 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Guido van Rossum91922671997-10-09 20:24:13 +00003431#
3432# SGI compilers allow the specification of the both the ABI and the
3433# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003434# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003435#
3436# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3437# thus supply support for various ABI/ISA combinations. The MACHDEP
3438# variable is also adjusted.
3439#
3440
3441if test ! -z "$SGI_ABI"
3442then
3443 CC="cc $SGI_ABI"
3444 LDFLAGS="$SGI_ABI $LDFLAGS"
3445 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3448$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
3466# XXX shouldn't some/most/all of this code be merged with the stuff later
3467# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3469$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003472if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003475 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476 without_gcc=yes;;
3477 yes) CC=gcc
3478 without_gcc=no;;
3479 *) CC=$withval
3480 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003481 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003484 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003485 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003486 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003487 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003488 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489fi
3490
Matthias Kloseb9621712010-04-24 17:59:49 +00003491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3492$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003493
Zachary Ware5af85642015-12-21 12:09:17 -06003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3495$as_echo_n "checking for --with-icc... " >&6; }
3496
3497# Check whether --with-icc was given.
3498if test "${with_icc+set}" = set; then :
3499 withval=$with_icc;
3500 case $withval in
3501 no) CC=${CC:-cc}
3502 with_icc=no;;
3503 yes) CC=icc
3504 CXX=icpc
3505 with_icc=yes;;
3506 *) CC=$withval
3507 with_icc=$withval;;
3508 esac
3509else
3510
3511 with_icc=no
3512fi
3513
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3515$as_echo "$with_icc" >&6; }
3516
Guido van Rossum8b131c51995-03-09 14:10:13 +00003517# If the user switches compilers, we can't believe the cache
3518if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003520 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003521(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522fi
3523
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003524# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3525# when the compiler supports them, but we don't always want -O2, and
3526# we set -g later.
3527if test -z "$CFLAGS"; then
3528 CFLAGS=
3529fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530
3531if test "$ac_sys_system" = "Darwin"
3532then
3533 # Compiler selection on MacOSX is more complicated than
3534 # AC_PROG_CC can handle, see Mac/README.txt for more
3535 # information
3536 if test -z "${CC}"
3537 then
3538 found_gcc=
3539 found_clang=
3540 as_save_IFS=$IFS; IFS=:
3541 for as_dir in $PATH
3542 do
3543 IFS=$as_save_IFS
3544 if test -x $as_dir/gcc; then
3545 if test -z "${found_gcc}"; then
3546 found_gcc=$as_dir/gcc
3547 fi
3548 fi
3549 if test -x $as_dir/clang; then
3550 if test -z "${found_clang}"; then
3551 found_clang=$as_dir/clang
3552 fi
3553 fi
3554 done
3555 IFS=$as_save_IFS
3556
3557 if test -n "$found_gcc" -a -n "$found_clang"
3558 then
3559 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3562$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3563 CC="$found_clang"
3564 CXX="$found_clang++"
3565 fi
3566
3567
3568 elif test -z "$found_gcc" -a -n "$found_clang"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3571$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3572 CC="$found_clang"
3573 CXX="$found_clang++"
3574
3575 elif test -z "$found_gcc" -a -z "$found_clang"
3576 then
3577 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3578 if test -n "${found_clang}"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3581$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3582 CC="${found_clang}"
3583 CXX="`/usr/bin/xcrun -find clang++`"
3584
3585 # else: use default behaviour
3586 fi
3587 fi
3588 fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
3595if test -n "$ac_tool_prefix"; then
3596 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3597set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3599$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003600if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003602else
3603 if test -n "$CC"; then
3604 ac_cv_prog_CC="$CC" # Let the user override the test.
3605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3607for as_dir in $PATH
3608do
3609 IFS=$as_save_IFS
3610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $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 +00003615 break 2
3616 fi
3617done
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003620
Jack Jansendd19cf82001-12-06 22:36:17 +00003621fi
3622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003624if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3626$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3629$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634if test -z "$ac_cv_prog_CC"; then
3635 ac_ct_CC=$CC
3636 # Extract the first word of "gcc", so it can be a program name with args.
3637set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3639$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003640if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
3643 if test -n "$ac_ct_CC"; then
3644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3645else
3646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3647for as_dir in $PATH
3648do
3649 IFS=$as_save_IFS
3650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $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 +00003655 break 2
3656 fi
3657done
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003660
3661fi
3662fi
3663ac_ct_CC=$ac_cv_prog_ac_ct_CC
3664if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3666$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3669$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test "x$ac_ct_CC" = x; then
3673 CC=""
3674 else
3675 case $cross_compiling:$ac_tool_warned in
3676yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679ac_tool_warned=yes ;;
3680esac
3681 CC=$ac_ct_CC
3682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683else
3684 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003685fi
3686
Jack Jansendd19cf82001-12-06 22:36:17 +00003687if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 if test -n "$ac_tool_prefix"; then
3689 # 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 +00003690set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003693if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003695else
3696 if test -n "$CC"; then
3697 ac_cv_prog_CC="$CC" # Let the user override the test.
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3700for as_dir in $PATH
3701do
3702 IFS=$as_save_IFS
3703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $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 +00003708 break 2
3709 fi
3710done
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003713
3714fi
3715fi
3716CC=$ac_cv_prog_CC
3717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 # Extract the first word of "cc", so it can be a program name with args.
3730set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743 IFS=$as_save_IFS
3744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3748 ac_prog_rejected=yes
3749 continue
3750 fi
3751 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $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 +00003753 break 2
3754 fi
3755done
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test $ac_prog_rejected = yes; then
3760 # We found a bogon in the path, so make sure we never use it.
3761 set dummy $ac_cv_prog_CC
3762 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764 # We chose a different compiler from the bogus one.
3765 # However, it has the same basename, so the bogon will be chosen
3766 # first if we set CC to just the basename; use the full file name.
3767 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003768 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 fi
3770fi
3771fi
3772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3776$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3779$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784if test -z "$CC"; then
3785 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 do
3788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003794else
3795 if test -n "$CC"; then
3796 ac_cv_prog_CC="$CC" # Let the user override the test.
3797else
Martin v. Löwis11437992002-04-12 09:54:03 +00003798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813fi
3814fi
3815CC=$ac_cv_prog_CC
3816if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3818$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003822fi
3823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$CC" && break
3826 done
3827fi
3828if test -z "$CC"; then
3829 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003831do
3832 # Extract the first word of "$ac_prog", so it can be a program name with args.
3833set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003836if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
3839 if test -n "$ac_ct_CC"; then
3840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3841else
3842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843for as_dir in $PATH
3844do
3845 IFS=$as_save_IFS
3846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $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 +00003851 break 2
3852 fi
3853done
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858fi
3859ac_ct_CC=$ac_cv_prog_ac_ct_CC
3860if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3862$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 test -n "$ac_ct_CC" && break
3870done
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 if test "x$ac_ct_CC" = x; then
3873 CC=""
3874 else
3875 case $cross_compiling:$ac_tool_warned in
3876yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_tool_warned=yes ;;
3880esac
3881 CC=$ac_ct_CC
3882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
3884
3885fi
3886
3887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003890as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003891See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
3893# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3895set X $ac_compile
3896ac_compiler=$2
3897for ac_option in --version -v -V -qversion; do
3898 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899case "(($ac_try" in
3900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901 *) ac_try_echo=$ac_try;;
3902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904$as_echo "$ac_try_echo"; } >&5
3905 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 if test -s conftest.err; then
3908 sed '10a\
3909... rest of stderr output deleted ...
3910 10q' conftest.err >conftest.er1
3911 cat conftest.er1 >&5
3912 fi
3913 rm -f conftest.er1 conftest.err
3914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3915 test $ac_status = 0; }
3916done
Martin v. Löwis11437992002-04-12 09:54:03 +00003917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003919/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003920
Martin v. Löwis11437992002-04-12 09:54:03 +00003921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003930ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003931# Try to create an executable without -o first, disregard a.out.
3932# It will help us diagnose broken compilers, and finding out an intuition
3933# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3935$as_echo_n "checking whether the C compiler works... " >&6; }
3936ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3937
3938# The possible output files:
3939ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941ac_rmfiles=
3942for ac_file in $ac_files
3943do
3944 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3947 esac
3948done
3949rm -f $ac_rmfiles
3950
Matthias Kloseb9621712010-04-24 17:59:49 +00003951if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952case "(($ac_try" in
3953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3954 *) ac_try_echo=$ac_try;;
3955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3957$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3963# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3964# in a Makefile. We should not override ac_cv_exeext if it was cached,
3965# so that the user can short-circuit this test for compilers unknown to
3966# Autoconf.
3967for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003968do
3969 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 ;;
3973 [ab].out )
3974 # We found the default executable, but exeext='' is most
3975 # certainly right.
3976 break;;
3977 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 then :; else
3980 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 fi
3982 # We set ac_cv_exeext here because the later test for it is not
3983 # safe: cross compilers may not add the suffix if given an `-o'
3984 # argument, so we may need to know it at that point already.
3985 # Even if this section looks crufty: it has the advantage of
3986 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987 break;;
3988 * )
3989 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 esac
3991done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992test "$ac_cv_exeext" = no && ac_cv_exeext=
3993
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003994else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 ac_file=''
3996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003997if test -z "$ac_file"; then :
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3999$as_echo "no" >&6; }
4000$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004001sed 's/^/| /' conftest.$ac_ext >&5
4002
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004005as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004006See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004007else
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4009$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4012$as_echo_n "checking for C compiler default output file name... " >&6; }
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4014$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4020$as_echo_n "checking for suffix of executables... " >&6; }
4021if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4033# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4034# work properly (i.e., refer to `conftest.exe'), while it won't with
4035# `rm'.
4036for ac_file in conftest.exe conftest conftest.*; do
4037 test -f "$ac_file" || continue
4038 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004040 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4041 break;;
4042 * ) break;;
4043 esac
4044done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004048as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004051rm -f conftest conftest$ac_cv_exeext
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4053$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054
4055rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004056EXEEXT=$ac_cv_exeext
4057ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4059/* end confdefs.h. */
4060#include <stdio.h>
4061int
4062main ()
4063{
4064FILE *f = fopen ("conftest.out", "w");
4065 return ferror (f) || fclose (f) != 0;
4066
4067 ;
4068 return 0;
4069}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004071ac_clean_files="$ac_clean_files conftest.out"
4072# Check that the compiler produces executables we can run. If not, either
4073# the compiler is broken, or we cross compile.
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4075$as_echo_n "checking whether we are cross compiling... " >&6; }
4076if test "$cross_compiling" != yes; then
4077 { { ac_try="$ac_link"
4078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
4082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
4084 (eval "$ac_link") 2>&5
4085 ac_status=$?
4086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }
4088 if { ac_try='./conftest$ac_cv_exeext'
4089 { { case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
4093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4094$as_echo "$ac_try_echo"; } >&5
4095 (eval "$ac_try") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }; }; then
4099 cross_compiling=no
4100 else
4101 if test "$cross_compiling" = maybe; then
4102 cross_compiling=yes
4103 else
4104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004106as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004108See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 fi
4110 fi
4111fi
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4113$as_echo "$cross_compiling" >&6; }
4114
4115rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4116ac_clean_files=$ac_clean_files_save
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4118$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
4121else
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004123/* end confdefs.h. */
4124
4125int
4126main ()
4127{
4128
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004134if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 for ac_file in conftest.o conftest.obj conftest.*; do
4146 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4150 break;;
4151 esac
4152done
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004155sed 's/^/| /' conftest.$ac_ext >&5
4156
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004159as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004160See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4165$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166OBJEXT=$ac_cv_objext
4167ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4169$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004170if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004175
Martin v. Löwis11437992002-04-12 09:54:03 +00004176int
4177main ()
4178{
4179#ifndef __GNUC__
4180 choke me
4181#endif
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 ac_compiler_gnu=yes
4189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_cv_c_compiler_gnu=$ac_compiler_gnu
4194
4195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4197$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4198if test $ac_compiler_gnu = yes; then
4199 GCC=yes
4200else
4201 GCC=
4202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_test_CFLAGS=${CFLAGS+set}
4204ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4206$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004207if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004209else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 ac_save_c_werror_flag=$ac_c_werror_flag
4211 ac_c_werror_flag=yes
4212 ac_cv_prog_cc_g=no
4213 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004226 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227else
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 CFLAGS=""
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241
Matthias Kloseb9621712010-04-24 17:59:49 +00004242else
4243 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246/* end confdefs.h. */
4247
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264 ac_c_werror_flag=$ac_save_c_werror_flag
4265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4267$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270elif test $ac_cv_prog_cc_g = yes; then
4271 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004272 CFLAGS="-g -O2"
4273 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275 fi
4276else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 if test "$GCC" = yes; then
4278 CFLAGS="-O2"
4279 else
4280 CFLAGS=
4281 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4284$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004289ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
4292#include <stdarg.h>
4293#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004294struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313
4314/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4315 function prototypes and stuff, but not '\xHH' hex character constants.
4316 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4319 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4324 inside strings and character constants. */
4325#define FOO(x) 'x'
4326int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4327
Skip Montanaro6dead952003-09-25 14:50:04 +00004328int test (int i, double x);
4329struct s1 {int (*f) (int a);};
4330struct s2 {int (*f) (double a);};
4331int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4332int argc;
4333char **argv;
4334int
4335main ()
4336{
4337return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4338 ;
4339 return 0;
4340}
4341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4343 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004344do
4345 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349rm -f core conftest.err conftest.$ac_objext
4350 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004351done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004353CC=$ac_save_CC
4354
4355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# AC_CACHE_VAL
4357case "x$ac_cv_prog_cc_c89" in
4358 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4360$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4363$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4367$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004368esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Martin v. Löwis11437992002-04-12 09:54:03 +00004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004379ac_ext=c
4380ac_cpp='$CPP $CPPFLAGS'
4381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4383ac_compiler_gnu=$ac_cv_c_compiler_gnu
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4385$as_echo_n "checking how to run the C preprocessor... " >&6; }
4386# On Suns, sometimes $CPP names a directory.
4387if test -n "$CPP" && test -d "$CPP"; then
4388 CPP=
4389fi
4390if test -z "$CPP"; then
4391 if ${ac_cv_prog_CPP+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 # Double quotes because CPP needs to be expanded
4395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4396 do
4397 ac_preproc_ok=false
4398for ac_c_preproc_warn_flag in '' yes
4399do
4400 # Use a header file that comes with gcc, so configuring glibc
4401 # with a fresh cross-compiler works.
4402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403 # <limits.h> exists even on freestanding compilers.
4404 # On the NeXT, cc -E runs the code through the compiler's parser,
4405 # not just through cpp. "Syntax error" is here to catch this case.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#ifdef __STDC__
4409# include <limits.h>
4410#else
4411# include <assert.h>
4412#endif
4413 Syntax error
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416
4417else
4418 # Broken: fails on valid input.
4419continue
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423 # OK, works on sane cases. Now check whether nonexistent headers
4424 # can be detected and how.
4425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4426/* end confdefs.h. */
4427#include <ac_nonexistent.h>
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430 # Broken: success on invalid input.
4431continue
4432else
4433 # Passes both tests.
4434ac_preproc_ok=:
4435break
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439done
4440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4441rm -f conftest.i conftest.err conftest.$ac_ext
4442if $ac_preproc_ok; then :
4443 break
4444fi
4445
4446 done
4447 ac_cv_prog_CPP=$CPP
4448
4449fi
4450 CPP=$ac_cv_prog_CPP
4451else
4452 ac_cv_prog_CPP=$CPP
4453fi
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4455$as_echo "$CPP" >&6; }
4456ac_preproc_ok=false
4457for ac_c_preproc_warn_flag in '' yes
4458do
4459 # Use a header file that comes with gcc, so configuring glibc
4460 # with a fresh cross-compiler works.
4461 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4462 # <limits.h> exists even on freestanding compilers.
4463 # On the NeXT, cc -E runs the code through the compiler's parser,
4464 # not just through cpp. "Syntax error" is here to catch this case.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#ifdef __STDC__
4468# include <limits.h>
4469#else
4470# include <assert.h>
4471#endif
4472 Syntax error
4473_ACEOF
4474if ac_fn_c_try_cpp "$LINENO"; then :
4475
4476else
4477 # Broken: fails on valid input.
4478continue
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482 # OK, works on sane cases. Now check whether nonexistent headers
4483 # can be detected and how.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ac_nonexistent.h>
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489 # Broken: success on invalid input.
4490continue
4491else
4492 # Passes both tests.
4493ac_preproc_ok=:
4494break
4495fi
4496rm -f conftest.err conftest.i conftest.$ac_ext
4497
4498done
4499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4500rm -f conftest.i conftest.err conftest.$ac_ext
4501if $ac_preproc_ok; then :
4502
4503else
4504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4506as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4507See \`config.log' for more details" "$LINENO" 5; }
4508fi
4509
4510ac_ext=c
4511ac_cpp='$CPP $CPPFLAGS'
4512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4514ac_compiler_gnu=$ac_cv_c_compiler_gnu
4515
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4517$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4518if ${ac_cv_path_GREP+:} false; then :
4519 $as_echo_n "(cached) " >&6
4520else
4521 if test -z "$GREP"; then
4522 ac_path_GREP_found=false
4523 # Loop through the user's path and test for each of PROGNAME-LIST
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_prog in grep ggrep; do
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4532 as_fn_executable_p "$ac_path_GREP" || continue
4533# Check for GNU ac_path_GREP and select it if it is found.
4534 # Check for GNU $ac_path_GREP
4535case `"$ac_path_GREP" --version 2>&1` in
4536*GNU*)
4537 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4538*)
4539 ac_count=0
4540 $as_echo_n 0123456789 >"conftest.in"
4541 while :
4542 do
4543 cat "conftest.in" "conftest.in" >"conftest.tmp"
4544 mv "conftest.tmp" "conftest.in"
4545 cp "conftest.in" "conftest.nl"
4546 $as_echo 'GREP' >> "conftest.nl"
4547 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4548 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4549 as_fn_arith $ac_count + 1 && ac_count=$as_val
4550 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4551 # Best one so far, save it but keep looking for a better one
4552 ac_cv_path_GREP="$ac_path_GREP"
4553 ac_path_GREP_max=$ac_count
4554 fi
4555 # 10*(2^10) chars as input seems more than enough
4556 test $ac_count -gt 10 && break
4557 done
4558 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4559esac
4560
4561 $ac_path_GREP_found && break 3
4562 done
4563 done
4564 done
4565IFS=$as_save_IFS
4566 if test -z "$ac_cv_path_GREP"; then
4567 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4568 fi
4569else
4570 ac_cv_path_GREP=$GREP
4571fi
4572
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4575$as_echo "$ac_cv_path_GREP" >&6; }
4576 GREP="$ac_cv_path_GREP"
4577
4578
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004579
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580
4581
Matthias Kloseb9621712010-04-24 17:59:49 +00004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4583$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004585# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004586if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004587 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589 case $withval in
4590 no) with_cxx_main=no
4591 MAINCC='$(CC)';;
4592 yes) with_cxx_main=yes
4593 MAINCC='$(CXX)';;
4594 *) with_cxx_main=yes
4595 MAINCC=$withval
4596 if test -z "$CXX"
4597 then
4598 CXX=$withval
4599 fi;;
4600 esac
4601else
4602
4603 with_cxx_main=no
4604 MAINCC='$(CC)'
4605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004606fi
4607
Matthias Kloseb9621712010-04-24 17:59:49 +00004608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4609$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
4611preset_cxx="$CXX"
4612if test -z "$CXX"
4613then
4614 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004615 gcc) if test -n "$ac_tool_prefix"; then
4616 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4617set dummy ${ac_tool_prefix}g++; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_CXX+:} false; then :
4621 $as_echo_n "(cached) " >&6
4622else
4623 case $CXX in
4624 [\\/]* | ?:[\\/]*)
4625 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4626 ;;
4627 *)
4628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in notfound
4630do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
4633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004635 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637 break 2
4638 fi
4639done
4640 done
4641IFS=$as_save_IFS
4642
4643 ;;
4644esac
4645fi
4646CXX=$ac_cv_path_CXX
4647if test -n "$CXX"; then
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4649$as_echo "$CXX" >&6; }
4650else
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656fi
4657if test -z "$ac_cv_path_CXX"; then
4658 ac_pt_CXX=$CXX
4659 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004663if ${ac_cv_path_ac_pt_CXX+:} false; then :
4664 $as_echo_n "(cached) " >&6
4665else
4666 case $ac_pt_CXX in
4667 [\\/]* | ?:[\\/]*)
4668 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4669 ;;
4670 *)
4671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4672for as_dir in notfound
4673do
4674 IFS=$as_save_IFS
4675 test -z "$as_dir" && as_dir=.
4676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680 break 2
4681 fi
4682done
4683 done
4684IFS=$as_save_IFS
4685
4686 ;;
4687esac
4688fi
4689ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4690if test -n "$ac_pt_CXX"; then
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4692$as_echo "$ac_pt_CXX" >&6; }
4693else
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698 if test "x$ac_pt_CXX" = x; then
4699 CXX="g++"
4700 else
4701 case $cross_compiling:$ac_tool_warned in
4702yes:)
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4705ac_tool_warned=yes ;;
4706esac
4707 CXX=$ac_pt_CXX
4708 fi
4709else
4710 CXX="$ac_cv_path_CXX"
4711fi
4712 ;;
4713 cc) if test -n "$ac_tool_prefix"; then
4714 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4715set dummy ${ac_tool_prefix}c++; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004718if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720else
4721 case $CXX in
4722 [\\/]* | ?:[\\/]*)
4723 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4724 ;;
4725 *)
4726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in notfound
4728do
4729 IFS=$as_save_IFS
4730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735 break 2
4736 fi
4737done
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004739IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ;;
4742esac
4743fi
4744CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004745if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4747$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004748else
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753
4754fi
4755if test -z "$ac_cv_path_CXX"; then
4756 ac_pt_CXX=$CXX
4757 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 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 +00004767 ;;
4768 *)
4769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in notfound
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 break 2
4779 fi
4780done
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004782IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 ;;
4785esac
4786fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4788if test -n "$ac_pt_CXX"; then
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4790$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791else
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 if test "x$ac_pt_CXX" = x; then
4797 CXX="c++"
4798 else
4799 case $cross_compiling:$ac_tool_warned in
4800yes:)
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4803ac_tool_warned=yes ;;
4804esac
4805 CXX=$ac_pt_CXX
4806 fi
4807else
4808 CXX="$ac_cv_path_CXX"
4809fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 clang|*/clang) if test -n "$ac_tool_prefix"; then
4812 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4813set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CXX+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818else
4819 case $CXX in
4820 [\\/]* | ?:[\\/]*)
4821 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4822 ;;
4823 *)
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in notfound
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004831 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ;;
4840esac
4841fi
4842CXX=$ac_cv_path_CXX
4843if test -n "$CXX"; then
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4845$as_echo "$CXX" >&6; }
4846else
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851
4852fi
4853if test -z "$ac_cv_path_CXX"; then
4854 ac_pt_CXX=$CXX
4855 # Extract the first word of "clang++", so it can be a program name with args.
4856set dummy clang++; ac_word=$2
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858$as_echo_n "checking for $ac_word... " >&6; }
4859if ${ac_cv_path_ac_pt_CXX+:} false; then :
4860 $as_echo_n "(cached) " >&6
4861else
4862 case $ac_pt_CXX in
4863 [\\/]* | ?:[\\/]*)
4864 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4865 ;;
4866 *)
4867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868for as_dir in notfound
4869do
4870 IFS=$as_save_IFS
4871 test -z "$as_dir" && as_dir=.
4872 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4876 break 2
4877 fi
4878done
4879 done
4880IFS=$as_save_IFS
4881
4882 ;;
4883esac
4884fi
4885ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4886if test -n "$ac_pt_CXX"; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4888$as_echo "$ac_pt_CXX" >&6; }
4889else
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894 if test "x$ac_pt_CXX" = x; then
4895 CXX="clang++"
4896 else
4897 case $cross_compiling:$ac_tool_warned in
4898yes:)
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4900$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4901ac_tool_warned=yes ;;
4902esac
4903 CXX=$ac_pt_CXX
4904 fi
4905else
4906 CXX="$ac_cv_path_CXX"
4907fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004909 icc|*/icc) if test -n "$ac_tool_prefix"; then
4910 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4911set dummy ${ac_tool_prefix}icpc; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if ${ac_cv_path_CXX+:} false; then :
4915 $as_echo_n "(cached) " >&6
4916else
4917 case $CXX in
4918 [\\/]* | ?:[\\/]*)
4919 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4920 ;;
4921 *)
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in notfound
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937 ;;
4938esac
4939fi
4940CXX=$ac_cv_path_CXX
4941if test -n "$CXX"; then
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4943$as_echo "$CXX" >&6; }
4944else
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949
4950fi
4951if test -z "$ac_cv_path_CXX"; then
4952 ac_pt_CXX=$CXX
4953 # Extract the first word of "icpc", so it can be a program name with args.
4954set dummy icpc; ac_word=$2
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_ac_pt_CXX+:} false; then :
4958 $as_echo_n "(cached) " >&6
4959else
4960 case $ac_pt_CXX in
4961 [\\/]* | ?:[\\/]*)
4962 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4963 ;;
4964 *)
4965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in notfound
4967do
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
4970 for ac_exec_ext in '' $ac_executable_extensions; do
4971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974 break 2
4975 fi
4976done
4977 done
4978IFS=$as_save_IFS
4979
4980 ;;
4981esac
4982fi
4983ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4984if test -n "$ac_pt_CXX"; then
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4986$as_echo "$ac_pt_CXX" >&6; }
4987else
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992 if test "x$ac_pt_CXX" = x; then
4993 CXX="icpc"
4994 else
4995 case $cross_compiling:$ac_tool_warned in
4996yes:)
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4999ac_tool_warned=yes ;;
5000esac
5001 CXX=$ac_pt_CXX
5002 fi
5003else
5004 CXX="$ac_cv_path_CXX"
5005fi
5006 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005007 esac
5008 if test "$CXX" = "notfound"
5009 then
5010 CXX=""
5011 fi
5012fi
5013if test -z "$CXX"
5014then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 if test -n "$ac_tool_prefix"; then
5016 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5017 do
5018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005024else
5025 if test -n "$CXX"; then
5026 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5027else
5028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005035 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037 break 2
5038 fi
5039done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042
5043fi
5044fi
5045CXX=$ac_cv_prog_CXX
5046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5048$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005052fi
5053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005055 test -n "$CXX" && break
5056 done
5057fi
5058if test -z "$CXX"; then
5059 ac_ct_CXX=$CXX
5060 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5061do
5062 # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5067 $as_echo_n "(cached) " >&6
5068else
5069 if test -n "$ac_ct_CXX"; then
5070 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5071else
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075 IFS=$as_save_IFS
5076 test -z "$as_dir" && as_dir=.
5077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 ac_cv_prog_ac_ct_CXX="$ac_prog"
5080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081 break 2
5082 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 done
5085IFS=$as_save_IFS
5086
5087fi
5088fi
5089ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5090if test -n "$ac_ct_CXX"; then
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5092$as_echo "$ac_ct_CXX" >&6; }
5093else
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099 test -n "$ac_ct_CXX" && break
5100done
5101
5102 if test "x$ac_ct_CXX" = x; then
5103 CXX="notfound"
5104 else
5105 case $cross_compiling:$ac_tool_warned in
5106yes:)
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5109ac_tool_warned=yes ;;
5110esac
5111 CXX=$ac_ct_CXX
5112 fi
5113fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114
5115 if test "$CXX" = "notfound"
5116 then
5117 CXX=""
5118 fi
5119fi
5120if test "$preset_cxx" != "$CXX"
5121then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005122 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123
5124 By default, distutils will build C++ extension modules with \"$CXX\".
5125 If this is not intended, then set CXX on the configure command line.
5126 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005131 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132fi
5133
5134
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005135MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5136
5137
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5139$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5140cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005141#undef bfin
5142#undef cris
5143#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005145#undef hppa
5146#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005148#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005149#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005152#if defined(__ANDROID__)
5153# if defined(__x86_64__) && defined(__LP64__)
5154 x86_64-linux-android
5155# elif defined(__i386__)
5156 i686-linux-android
5157# elif defined(__aarch64__) && defined(__AARCH64EL__)
5158# if defined(__ILP32__)
5159 aarch64_ilp32-linux-android
5160# else
5161 aarch64-linux-android
5162# endif
5163# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5164 arm-linux-androideabi
5165# elif defined(__mips_hard_float) && defined(_MIPSEL)
5166# if _MIPS_SIM == _ABIO32
5167 mipsel-linux-android
5168# elif _MIPS_SIM == _ABI64
5169 mips64el-linux-android
5170# else
5171# error unknown platform triplet
5172# endif
5173# else
5174# error unknown platform triplet
5175# endif
5176#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005177# if defined(__x86_64__) && defined(__LP64__)
5178 x86_64-linux-gnu
5179# elif defined(__x86_64__) && defined(__ILP32__)
5180 x86_64-linux-gnux32
5181# elif defined(__i386__)
5182 i386-linux-gnu
5183# elif defined(__aarch64__) && defined(__AARCH64EL__)
5184# if defined(__ILP32__)
5185 aarch64_ilp32-linux-gnu
5186# else
5187 aarch64-linux-gnu
5188# endif
5189# elif defined(__aarch64__) && defined(__AARCH64EB__)
5190# if defined(__ILP32__)
5191 aarch64_be_ilp32-linux-gnu
5192# else
5193 aarch64_be-linux-gnu
5194# endif
5195# elif defined(__alpha__)
5196 alpha-linux-gnu
5197# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5198# if defined(__ARMEL__)
5199 arm-linux-gnueabihf
5200# else
5201 armeb-linux-gnueabihf
5202# endif
5203# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5204# if defined(__ARMEL__)
5205 arm-linux-gnueabi
5206# else
5207 armeb-linux-gnueabi
5208# endif
5209# elif defined(__hppa__)
5210 hppa-linux-gnu
5211# elif defined(__ia64__)
5212 ia64-linux-gnu
5213# elif defined(__m68k__) && !defined(__mcoldfire__)
5214 m68k-linux-gnu
5215# elif defined(__mips_hard_float) && defined(_MIPSEL)
5216# if _MIPS_SIM == _ABIO32
5217 mipsel-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mips64el-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mips64el-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
5225# elif defined(__mips_hard_float)
5226# if _MIPS_SIM == _ABIO32
5227 mips-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__or1k__)
5236 or1k-linux-gnu
5237# elif defined(__powerpc__) && defined(__SPE__)
5238 powerpc-linux-gnuspe
5239# elif defined(__powerpc64__)
5240# if defined(__LITTLE_ENDIAN__)
5241 powerpc64le-linux-gnu
5242# else
5243 powerpc64-linux-gnu
5244# endif
5245# elif defined(__powerpc__)
5246 powerpc-linux-gnu
5247# elif defined(__s390x__)
5248 s390x-linux-gnu
5249# elif defined(__s390__)
5250 s390-linux-gnu
5251# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5252 sh4-linux-gnu
5253# elif defined(__sparc__) && defined(__arch64__)
5254 sparc64-linux-gnu
5255# elif defined(__sparc__)
5256 sparc-linux-gnu
5257# else
5258# error unknown platform triplet
5259# endif
5260#elif defined(__FreeBSD_kernel__)
5261# if defined(__LP64__)
5262 x86_64-kfreebsd-gnu
5263# elif defined(__i386__)
5264 i386-kfreebsd-gnu
5265# else
5266# error unknown platform triplet
5267# endif
5268#elif defined(__gnu_hurd__)
5269 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005270#elif defined(__APPLE__)
5271 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005272#else
5273# error unknown platform triplet
5274#endif
5275
5276EOF
5277
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005278if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5281$as_echo "$PLATFORM_TRIPLET" >&6; }
5282else
5283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5284$as_echo "none" >&6; }
5285fi
5286rm -f conftest.c conftest.out
5287
5288if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5289 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5290 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5291 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005292elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5293 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005295if test x$PLATFORM_TRIPLET = x; then
5296 PLATDIR=plat-$MACHDEP
5297else
5298 PLATDIR=plat-$PLATFORM_TRIPLET
5299fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300
5301
doko@ubuntu.com55532312016-06-14 08:55:19 +02005302if test x$MULTIARCH != x; then
5303 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5308$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5309save_LDFLAGS="$LDFLAGS"
5310LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313/* end confdefs.h. */
5314
5315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_link "$LINENO"; then :
5324 NO_AS_NEEDED="-Wl,--no-as-needed"
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; }
5327else
5328 NO_AS_NEEDED=""
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332rm -f core conftest.err conftest.$ac_objext \
5333 conftest$ac_exeext conftest.$ac_ext
5334LDFLAGS="$save_LDFLAGS"
5335
5336
5337
5338# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5341$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005342if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344else
5345 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5346 then ac_cv_path_EGREP="$GREP -E"
5347 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 # Loop through the user's path and test for each of PROGNAME-LIST
5351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5353do
5354 IFS=$as_save_IFS
5355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 for ac_prog in egrep; do
5357 for ac_exec_ext in '' $ac_executable_extensions; do
5358 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005359 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005360# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 # Check for GNU $ac_path_EGREP
5362case `"$ac_path_EGREP" --version 2>&1` in
5363*GNU*)
5364 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5365*)
5366 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368 while :
5369 do
5370 cat "conftest.in" "conftest.in" >"conftest.tmp"
5371 mv "conftest.tmp" "conftest.in"
5372 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5375 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5378 # Best one so far, save it but keep looking for a better one
5379 ac_cv_path_EGREP="$ac_path_EGREP"
5380 ac_path_EGREP_max=$ac_count
5381 fi
5382 # 10*(2^10) chars as input seems more than enough
5383 test $ac_count -gt 10 && break
5384 done
5385 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5386esac
5387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $ac_path_EGREP_found && break 3
5389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005394 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 +00005395 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396else
5397 ac_cv_path_EGREP=$EGREP
5398fi
5399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 fi
5401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5403$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005405
5406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5408$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005409if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
5411else
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005413/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005414#include <stdlib.h>
5415#include <stdarg.h>
5416#include <string.h>
5417#include <float.h>
5418
5419int
5420main ()
5421{
5422
5423 ;
5424 return 0;
5425}
5426_ACEOF
5427if ac_fn_c_try_compile "$LINENO"; then :
5428 ac_cv_header_stdc=yes
5429else
5430 ac_cv_header_stdc=no
5431fi
5432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437/* end confdefs.h. */
5438#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005439
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005444else
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005447rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449fi
5450
5451if test $ac_cv_header_stdc = yes; then
5452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454/* end confdefs.h. */
5455#include <stdlib.h>
5456
5457_ACEOF
5458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5459 $EGREP "free" >/dev/null 2>&1; then :
5460
5461else
5462 ac_cv_header_stdc=no
5463fi
5464rm -f conftest*
5465
5466fi
5467
5468if test $ac_cv_header_stdc = yes; then
5469 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5470 if test "$cross_compiling" = yes; then :
5471 :
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <ctype.h>
5476#include <stdlib.h>
5477#if ((' ' & 0x0FF) == 0x020)
5478# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5479# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5480#else
5481# define ISLOWER(c) \
5482 (('a' <= (c) && (c) <= 'i') \
5483 || ('j' <= (c) && (c) <= 'r') \
5484 || ('s' <= (c) && (c) <= 'z'))
5485# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5486#endif
5487
5488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5489int
5490main ()
5491{
5492 int i;
5493 for (i = 0; i < 256; i++)
5494 if (XOR (islower (i), ISLOWER (i))
5495 || toupper (i) != TOUPPER (i))
5496 return 2;
5497 return 0;
5498}
5499_ACEOF
5500if ac_fn_c_try_run "$LINENO"; then :
5501
5502else
5503 ac_cv_header_stdc=no
5504fi
5505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5506 conftest.$ac_objext conftest.beam conftest.$ac_ext
5507fi
5508
5509fi
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5512$as_echo "$ac_cv_header_stdc" >&6; }
5513if test $ac_cv_header_stdc = yes; then
5514
5515$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5516
5517fi
5518
5519# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5520for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5521 inttypes.h stdint.h unistd.h
5522do :
5523 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5524ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5525"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005526if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 cat >>confdefs.h <<_ACEOF
5528#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5529_ACEOF
5530
5531fi
5532
5533done
5534
5535
5536
5537 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 +02005538if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 MINIX=yes
5540else
5541 MINIX=
5542fi
5543
5544
5545 if test "$MINIX" = yes; then
5546
5547$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5548
5549
5550$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5551
5552
5553$as_echo "#define _MINIX 1" >>confdefs.h
5554
5555 fi
5556
5557
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5559$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005560if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 $as_echo_n "(cached) " >&6
5562else
5563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5564/* end confdefs.h. */
5565
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005566# define __EXTENSIONS__ 1
5567 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005568int
5569main ()
5570{
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576if ac_fn_c_try_compile "$LINENO"; then :
5577 ac_cv_safe_to_define___extensions__=yes
5578else
5579 ac_cv_safe_to_define___extensions__=no
5580fi
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582fi
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5584$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5585 test $ac_cv_safe_to_define___extensions__ = yes &&
5586 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5587
5588 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5589
5590 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5591
5592 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5593
5594 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5595
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
Xavier de Gaye95750b12016-07-09 11:05:42 +02005598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5599$as_echo_n "checking for the Android API level... " >&6; }
5600cat >> conftest.c <<EOF
5601#ifdef __ANDROID__
5602#include <android/api-level.h>
5603__ANDROID_API__
5604#else
5605#error not Android
5606#endif
5607EOF
5608
5609if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5610 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5612$as_echo "$ANDROID_API_LEVEL" >&6; }
5613
5614cat >>confdefs.h <<_ACEOF
5615#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5616_ACEOF
5617
5618else
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5620$as_echo "not Android" >&6; }
5621fi
5622rm -f conftest.c conftest.out
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624# Check for unsupported systems
5625case $ac_sys_system/$ac_sys_release in
5626atheos*|Linux*/1*)
5627 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5628 echo See README for details.
5629 exit 1;;
5630esac
5631
5632
Matthias Kloseb9621712010-04-24 17:59:49 +00005633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5634$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
5636# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005637if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 withval=$with_suffix;
5639 case $withval in
5640 no) EXEEXT=;;
5641 yes) EXEEXT=.exe;;
5642 *) EXEEXT=$withval;;
5643 esac
5644fi
5645
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5647$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649# Test whether we're running on a non-case-sensitive system, in which
5650# case we give a warning if no ext is given
5651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5653$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654if test ! -d CaseSensitiveTestDir; then
5655mkdir CaseSensitiveTestDir
5656fi
5657
5658if test -d casesensitivetestdir
5659then
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5661$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 BUILDEXEEXT=.exe
5663else
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 BUILDEXEEXT=$EXEEXT
5667fi
5668rmdir CaseSensitiveTestDir
5669
5670case $MACHDEP in
5671bsdos*)
5672 case $CC in
5673 gcc) CC="$CC -D_HAVE_BSDI";;
5674 esac;;
5675esac
5676
5677case $ac_sys_system in
5678hp*|HP*)
5679 case $CC in
5680 cc|*/cc) CC="$CC -Ae";;
5681 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682esac
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5686$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test -z "$LIBRARY"
5688then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005689 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5692$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# LDLIBRARY is the name of the library to link against (as opposed to the
5695# name of the library into which to insert object files). BLDLIBRARY is also
5696# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5697# is blank as the main program is not linked directly against LDLIBRARY.
5698# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5699# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5700# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5701# DLLLIBRARY is the shared (i.e., DLL) library.
5702#
5703# RUNSHARED is used to run shared python without installed libraries
5704#
5705# INSTSONAME is the name of the shared library that will be use to install
5706# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005707#
5708# LDVERSION is the shared library version number, normally the Python version
5709# with the ABI build flags appended.
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
5712
5713
5714
5715
5716
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718LDLIBRARY="$LIBRARY"
5719BLDLIBRARY='$(LDLIBRARY)'
5720INSTSONAME='$(LDLIBRARY)'
5721DLLLIBRARY=''
5722LDLIBRARYDIR=''
5723RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005724LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726# LINKCC is the command that links the python executable -- default is $(CC).
5727# If CXX is set, and if it is needed to link a main function that was
5728# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5729# python might then depend on the C++ runtime
5730# This is altered for AIX in order to build the export list before
5731# linking.
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5734$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test -z "$LINKCC"
5736then
5737 LINKCC='$(PURIFY) $(MAINCC)'
5738 case $ac_sys_system in
5739 AIX*)
5740 exp_extra="\"\""
5741 if test $ac_sys_release -ge 5 -o \
5742 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5743 exp_extra="."
5744 fi
5745 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 QNX*)
5747 # qcc must be used because the other compilers do not
5748 # support -N.
5749 LINKCC=qcc;;
5750 esac
5751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5753$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5756# make sure we default having it set to "no": this is used by
5757# distutils.unixccompiler to know if it should add --enable-new-dtags
5758# to linker command lines, and failing to detect GNU ld simply results
5759# in the same bahaviour as before.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5762$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763ac_prog=ld
5764if test "$GCC" = yes; then
5765 ac_prog=`$CC -print-prog-name=ld`
5766fi
5767case `"$ac_prog" -V 2>&1 < /dev/null` in
5768 *GNU*)
5769 GNULD=yes;;
5770 *)
5771 GNULD=no;;
5772esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5774$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5777$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005778if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005779 $as_echo_n "(cached) " >&6
5780else
5781 ac_cv_c_inline=no
5782for ac_kw in inline __inline__ __inline; do
5783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5784/* end confdefs.h. */
5785#ifndef __cplusplus
5786typedef int foo_t;
5787static $ac_kw foo_t static_foo () {return 0; }
5788$ac_kw foo_t foo () {return 0; }
5789#endif
5790
5791_ACEOF
5792if ac_fn_c_try_compile "$LINENO"; then :
5793 ac_cv_c_inline=$ac_kw
5794fi
5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 test "$ac_cv_c_inline" != no && break
5797done
5798
5799fi
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5801$as_echo "$ac_cv_c_inline" >&6; }
5802
5803case $ac_cv_c_inline in
5804 inline | yes) ;;
5805 *)
5806 case $ac_cv_c_inline in
5807 no) ac_val=;;
5808 *) ac_val=$ac_cv_c_inline;;
5809 esac
5810 cat >>confdefs.h <<_ACEOF
5811#ifndef __cplusplus
5812#define inline $ac_val
5813#endif
5814_ACEOF
5815 ;;
5816esac
5817
5818if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005819
5820$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005821
5822
5823fi
5824
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5827$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005829if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830 enableval=$enable_shared;
5831fi
5832
5833
5834if test -z "$enable_shared"
5835then
5836 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005837 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 enable_shared="yes";;
5839 *)
5840 enable_shared="no";;
5841 esac
5842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5844$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5847$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005849if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850 enableval=$enable_profiling;
5851fi
5852
5853if test "x$enable_profiling" = xyes; then
5854 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005855 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857/* end confdefs.h. */
5858int main() { return 0; }
5859_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005860if ac_fn_c_try_link "$LINENO"; then :
5861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005863 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865rm -f core conftest.err conftest.$ac_objext \
5866 conftest$ac_exeext conftest.$ac_ext
5867 CC="$ac_save_cc"
5868else
5869 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5872$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
doko@ubuntu.comba015832012-06-30 16:52:05 +02005874if test "x$enable_profiling" = xyes; then
5875 BASECFLAGS="-pg $BASECFLAGS"
5876 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
5878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5880$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
5882# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5883# library that we build, but we do not want to link against it (we
5884# will find it with a -framework option). For this reason there is an
5885# extra variable BLDLIBRARY against which Python and the extension
5886# modules are linked, BLDLIBRARY. This is normally the same as
5887# LDLIBRARY, but empty for MacOSX framework builds.
5888if test "$enable_framework"
5889then
5890 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005891 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 BLDLIBRARY=''
5893else
5894 BLDLIBRARY='$(LDLIBRARY)'
5895fi
5896
5897# Other platforms follow
5898if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005899 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
5903 case $ac_sys_system in
5904 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).dll.a'
5906 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ;;
5908 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 LDLIBRARY='libpython$(LDVERSION).so'
5910 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005911 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005913 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005914 then
5915 PY3LIBRARY=libpython3.so
5916 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005918 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).so'
5920 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005924 then
5925 PY3LIBRARY=libpython3.so
5926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
5928 hp*|HP*)
5929 case `uname -m` in
5930 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).dylib'
5942 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005945 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005947 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005948 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
5950 esac
5951else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005952 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 case $ac_sys_system in
5954 CYGWIN*)
5955 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 esac
5959fi
5960
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005961if test "$cross_compiling" = yes; then
5962 RUNSHARED=
5963fi
5964
Matthias Kloseb9621712010-04-24 17:59:49 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5966$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967
5968if test -n "$ac_tool_prefix"; then
5969 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5970set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005973if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975else
5976 if test -n "$RANLIB"; then
5977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5978else
5979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982 IFS=$as_save_IFS
5983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 break 2
5989 fi
5990done
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992IFS=$as_save_IFS
5993
5994fi
5995fi
5996RANLIB=$ac_cv_prog_RANLIB
5997if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5999$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000else
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6002$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003fi
6004
6005
6006fi
6007if test -z "$ac_cv_prog_RANLIB"; then
6008 ac_ct_RANLIB=$RANLIB
6009 # Extract the first word of "ranlib", so it can be a program name with args.
6010set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6012$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006013if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
6016 if test -n "$ac_ct_RANLIB"; then
6017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6018else
6019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020for as_dir in $PATH
6021do
6022 IFS=$as_save_IFS
6023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 break 2
6029 fi
6030done
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032IFS=$as_save_IFS
6033
6034fi
6035fi
6036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6037if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6039$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043fi
6044
6045 if test "x$ac_ct_RANLIB" = x; then
6046 RANLIB=":"
6047 else
6048 case $cross_compiling:$ac_tool_warned in
6049yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052ac_tool_warned=yes ;;
6053esac
6054 RANLIB=$ac_ct_RANLIB
6055 fi
6056else
6057 RANLIB="$ac_cv_prog_RANLIB"
6058fi
6059
6060
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in ar aal
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006068if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070else
6071 if test -n "$AR"; then
6072 ac_cv_prog_AR="$AR" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006081 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 break 2
6084 fi
6085done
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087IFS=$as_save_IFS
6088
6089fi
6090fi
6091AR=$ac_cv_prog_AR
6092if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6094$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095else
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098fi
6099
6100
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006101 test -n "$AR" && break
6102 done
6103fi
6104if test -z "$AR"; then
6105 ac_ct_AR=$AR
6106 for ac_prog in ar aal
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_AR+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_AR"; then
6116 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006125 ac_cv_prog_ac_ct_AR="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_AR=$ac_cv_prog_ac_ct_AR
6136if test -n "$ac_ct_AR"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6138$as_echo "$ac_ct_AR" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_AR" && break
6146done
6147
6148 if test "x$ac_ct_AR" = x; then
6149 AR="ar"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 AR=$ac_ct_AR
6158 fi
6159fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160
6161
6162# tweak ARFLAGS only if the user didn't set it on the command line
6163
6164if test -z "$ARFLAGS"
6165then
6166 ARFLAGS="rc"
6167fi
6168
doko@ubuntu.com58844492012-06-30 18:25:32 +02006169if test -n "$ac_tool_prefix"; then
6170 for ac_prog in readelf
6171 do
6172 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6173set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6175$as_echo_n "checking for $ac_word... " >&6; }
6176if ${ac_cv_prog_READELF+:} false; then :
6177 $as_echo_n "(cached) " >&6
6178else
6179 if test -n "$READELF"; then
6180 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6181else
6182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
6187 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006189 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6191 break 2
6192 fi
6193done
6194 done
6195IFS=$as_save_IFS
6196
6197fi
6198fi
6199READELF=$ac_cv_prog_READELF
6200if test -n "$READELF"; then
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6202$as_echo "$READELF" >&6; }
6203else
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
6206fi
6207
6208
6209 test -n "$READELF" && break
6210 done
6211fi
6212if test -z "$READELF"; then
6213 ac_ct_READELF=$READELF
6214 for ac_prog in readelf
6215do
6216 # Extract the first word of "$ac_prog", so it can be a program name with args.
6217set dummy $ac_prog; ac_word=$2
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6219$as_echo_n "checking for $ac_word... " >&6; }
6220if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6221 $as_echo_n "(cached) " >&6
6222else
6223 if test -n "$ac_ct_READELF"; then
6224 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6225else
6226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH
6228do
6229 IFS=$as_save_IFS
6230 test -z "$as_dir" && as_dir=.
6231 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006232 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006233 ac_cv_prog_ac_ct_READELF="$ac_prog"
6234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235 break 2
6236 fi
6237done
6238 done
6239IFS=$as_save_IFS
6240
6241fi
6242fi
6243ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6244if test -n "$ac_ct_READELF"; then
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6246$as_echo "$ac_ct_READELF" >&6; }
6247else
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249$as_echo "no" >&6; }
6250fi
6251
6252
6253 test -n "$ac_ct_READELF" && break
6254done
6255
6256 if test "x$ac_ct_READELF" = x; then
6257 READELF=":"
6258 else
6259 case $cross_compiling:$ac_tool_warned in
6260yes:)
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6263ac_tool_warned=yes ;;
6264esac
6265 READELF=$ac_ct_READELF
6266 fi
6267fi
6268
6269if test "$cross_compiling" = yes; then
6270 case "$READELF" in
6271 readelf|:)
6272 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6273 ;;
6274 esac
6275fi
6276
6277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279case $MACHDEP in
6280bsdos*|hp*|HP*)
6281 # install -d does not work on BSDI or HP-UX
6282 if test -z "$INSTALL"
6283 then
6284 INSTALL="${srcdir}/install-sh -c"
6285 fi
6286esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287# Find a good install program. We prefer a C program (faster),
6288# so one script is as good as another. But avoid the broken or
6289# incompatible versions:
6290# SysV /etc/install, /usr/sbin/install
6291# SunOS /usr/etc/install
6292# IRIX /sbin/install
6293# AIX /bin/install
6294# AmigaOS /C/install, which installs bootblocks on floppy discs
6295# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6296# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6297# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6298# OS/2's system install, which has a completely different semantic
6299# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006300# Reject install programs that cannot install multiple files.
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6302$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006304if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306else
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310 IFS=$as_save_IFS
6311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 # Account for people who put trailing slashes in PATH elements.
6313case $as_dir/ in #((
6314 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 /usr/ucb/* ) ;;
6318 *)
6319 # OSF1 and SCO ODT 3.0 have their own names for install.
6320 # Don't use installbsd from OSF since it installs stuff as root
6321 # by default.
6322 for ac_prog in ginstall scoinst install; do
6323 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006324 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 if test $ac_prog = install &&
6326 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6327 # AIX install. It has an incompatible calling convention.
6328 :
6329 elif test $ac_prog = install &&
6330 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6331 # program-specific install script used by HP pwplus--don't use.
6332 :
6333 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 rm -rf conftest.one conftest.two conftest.dir
6335 echo one > conftest.one
6336 echo two > conftest.two
6337 mkdir conftest.dir
6338 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6339 test -s conftest.one && test -s conftest.two &&
6340 test -s conftest.dir/conftest.one &&
6341 test -s conftest.dir/conftest.two
6342 then
6343 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6344 break 3
6345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346 fi
6347 fi
6348 done
6349 done
6350 ;;
6351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006352
6353 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354IFS=$as_save_IFS
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357
6358fi
6359 if test "${ac_cv_path_install+set}" = set; then
6360 INSTALL=$ac_cv_path_install
6361 else
6362 # As a last resort, use the slow shell script. Don't cache a
6363 # value for INSTALL within a source directory, because that will
6364 # break other packages using the cache if that directory is
6365 # removed, or if the value is a relative name.
6366 INSTALL=$ac_install_sh
6367 fi
6368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6370$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
6372# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6373# It thinks the first close brace ends the variable substitution.
6374test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6375
6376test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6377
6378test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6379
Matthias Klose93a0ef12012-03-15 18:08:34 +01006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6381$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6382if test -z "$MKDIR_P"; then
6383 if ${ac_cv_path_mkdir+:} false; then :
6384 $as_echo_n "(cached) " >&6
6385else
6386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6388do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_prog in mkdir gmkdir; do
6392 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006393 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006394 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6395 'mkdir (GNU coreutils) '* | \
6396 'mkdir (coreutils) '* | \
6397 'mkdir (fileutils) '4.1*)
6398 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6399 break 3;;
6400 esac
6401 done
6402 done
6403 done
6404IFS=$as_save_IFS
6405
6406fi
6407
6408 test -d ./--version && rmdir ./--version
6409 if test "${ac_cv_path_mkdir+set}" = set; then
6410 MKDIR_P="$ac_cv_path_mkdir -p"
6411 else
6412 # As a last resort, use the slow shell script. Don't cache a
6413 # value for MKDIR_P within a source directory, because that will
6414 # break other packages using the cache if that directory is
6415 # removed, or if the value is a relative name.
6416 MKDIR_P="$ac_install_sh -d"
6417 fi
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6420$as_echo "$MKDIR_P" >&6; }
6421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422
6423# Not every filesystem supports hard links
6424
6425if test -z "$LN" ; then
6426 case $ac_sys_system in
6427 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 *) LN=ln;;
6429 esac
6430fi
6431
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006432# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006433
6434ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6438$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439
6440# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006441if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442 withval=$with_pydebug;
6443if test "$withval" != no
6444then
6445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6449$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006451 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006452else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454fi
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458fi
6459
6460
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006461# Enable LTO flags
6462
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6464$as_echo_n "checking for --with-lto... " >&6; }
6465
6466# Check whether --with-lto was given.
6467if test "${with_lto+set}" = set; then :
6468 withval=$with_lto;
6469if test "$withval" != no
6470then
6471 Py_LTO='true'
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6473$as_echo "yes" >&6; };
6474else
6475 Py_LTO='false'
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; };
6478fi
6479else
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483
6484if test "$Py_LTO" = 'true' ; then
6485 case $CC in
6486 *clang*)
6487 # Any changes made here should be reflected in the GCC+Darwin case below
6488 LTOFLAGS="-flto"
6489 ;;
6490 *gcc*)
6491 case $ac_sys_system in
6492 Darwin*)
6493 LTOFLAGS="-flto"
6494 ;;
6495 *)
6496 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6497 ;;
6498 esac
6499 ;;
6500 esac
6501fi
6502
Brett Cannon7188a3e2015-09-18 15:13:44 -07006503# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006504
6505
6506
6507
6508
6509
Brett Cannon7188a3e2015-09-18 15:13:44 -07006510# Extract the first word of "llvm-profdata", so it can be a program name with args.
6511set dummy llvm-profdata; ac_word=$2
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513$as_echo_n "checking for $ac_word... " >&6; }
6514if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6515 $as_echo_n "(cached) " >&6
6516else
6517 if test -n "$LLVM_PROF_FOUND"; then
6518 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6519else
6520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521for as_dir in $PATH
6522do
6523 IFS=$as_save_IFS
6524 test -z "$as_dir" && as_dir=.
6525 for ac_exec_ext in '' $ac_executable_extensions; do
6526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6527 ac_cv_prog_LLVM_PROF_FOUND="found"
6528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6529 break 2
6530 fi
6531done
6532 done
6533IFS=$as_save_IFS
6534
6535 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6536fi
6537fi
6538LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6539if test -n "$LLVM_PROF_FOUND"; then
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6541$as_echo "$LLVM_PROF_FOUND" >&6; }
6542else
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; }
6545fi
6546
6547
6548LLVM_PROF_ERR=no
6549case $CC in
6550 *clang*)
6551 # Any changes made here should be reflected in the GCC+Darwin case below
6552 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6553 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6554 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6555 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6556 if test $LLVM_PROF_FOUND = not-found
6557 then
6558 LLVM_PROF_ERR=yes
6559 fi
6560 ;;
6561 *gcc*)
6562 case $ac_sys_system in
6563 Darwin*)
6564 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6565 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6566 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6567 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6568 if test $LLVM_PROF_FOUND = not-found
6569 then
6570 LLVM_PROF_ERR=yes
6571 fi
6572 ;;
6573 *)
6574 PGO_PROF_GEN_FLAG="-fprofile-generate"
6575 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6576 LLVM_PROF_MERGER="true"
6577 LLVM_PROF_FILE=""
6578 ;;
6579 esac
6580 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006581 *icc*)
6582 PGO_PROF_GEN_FLAG="-prof-gen"
6583 PGO_PROF_USE_FLAG="-prof-use"
6584 LLVM_PROF_MERGER="true"
6585 LLVM_PROF_FILE=""
6586 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006587esac
6588
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006589# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6590# merged with this chunk of code?
6591
6592# Optimizer/debugger flags
6593# ------------------------
6594# (The following bit of code is complicated enough - please keep things
6595# indented properly. Just pretend you're editing Python code. ;-)
6596
6597# There are two parallel sets of case statements below, one that checks to
6598# see if OPT was set and one that does BASECFLAGS setting based upon
6599# compiler and platform. BASECFLAGS tweaks need to be made even if the
6600# user set OPT.
6601
6602# tweak OPT based on compiler and platform, only if the user didn't set
6603# it on the command line
6604
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006605if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606then
6607 case $GCC in
6608 yes)
6609 if test "$CC" != 'g++' ; then
6610 STRICT_PROTO="-Wstrict-prototypes"
6611 fi
6612 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6613 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6614 WRAP="-fwrapv"
6615 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006616
6617 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006618 case $CC in
6619 *clang*) WRAP="-fwrapv"
6620 ;;
6621 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623 case $ac_cv_prog_cc_g in
6624 yes)
6625 if test "$Py_DEBUG" = 'true' ; then
6626 # Optimization messes up debuggers, so turn it off for
6627 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006628 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6629 OPT="-g -Og -Wall $STRICT_PROTO"
6630 else
6631 OPT="-g -O0 -Wall $STRICT_PROTO"
6632 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633 else
6634 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6635 fi
6636 ;;
6637 *)
6638 OPT="-O3 -Wall $STRICT_PROTO"
6639 ;;
6640 esac
6641 case $ac_sys_system in
6642 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6643 ;;
6644 esac
6645 ;;
6646
6647 *)
6648 OPT="-O"
6649 ;;
6650 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651fi
6652
6653
6654
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006655
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656# The -arch flags for universal builds on OSX
6657UNIVERSAL_ARCH_FLAGS=
6658
6659
6660# tweak BASECFLAGS based on compiler and platform
6661case $GCC in
6662yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006663 # Python doesn't violate C99 aliasing rules, but older versions of
6664 # GCC produce warnings for legal Python code. Enable
6665 # -fno-strict-aliasing on versions of GCC that support but produce
6666 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6668$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669 ac_save_cc="$CC"
6670 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006671 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006672 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006677
Matthias Kloseb159a552010-04-25 21:00:44 +00006678
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006679int
6680main ()
6681{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006682
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006683 ;
6684 return 0;
6685}
Matthias Kloseb159a552010-04-25 21:00:44 +00006686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006688if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006689
6690 CC="$ac_save_cc -fstrict-aliasing"
6691 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006693/* end confdefs.h. */
6694
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006695 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006696int
6697main ()
6698{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006699double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006700 ;
6701 return 0;
6702}
Matthias Kloseb159a552010-04-25 21:00:44 +00006703
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006705if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006706
6707 ac_cv_no_strict_aliasing=no
6708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709else
Matthias Kloseb159a552010-04-25 21:00:44 +00006710
6711 ac_cv_no_strict_aliasing=yes
6712
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006713fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006715
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006716else
Matthias Kloseb159a552010-04-25 21:00:44 +00006717
6718 ac_cv_no_strict_aliasing=no
6719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006722fi
6723
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006724 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6727$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006728 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 then
6730 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6731 fi
6732
Zachary Ware5af85642015-12-21 12:09:17 -06006733 # ICC doesn't recognize the option, but only emits a warning
6734 ## XXX does it emit an unused result warning and can it be disabled?
6735 case "$CC" in
6736 *icc*)
6737 ac_cv_disable_unused_result_warning=no
6738 ;;
6739 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6741$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6742 ac_save_cc="$CC"
6743 CC="$CC -Wunused-result -Werror"
6744 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006745 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006746 $as_echo_n "(cached) " >&6
6747else
6748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6749/* end confdefs.h. */
6750
6751
6752int
6753main ()
6754{
6755
6756 ;
6757 return 0;
6758}
6759
6760_ACEOF
6761if ac_fn_c_try_compile "$LINENO"; then :
6762
6763 ac_cv_disable_unused_result_warning=yes
6764
6765else
6766
6767 ac_cv_disable_unused_result_warning=no
6768
6769fi
6770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6771fi
6772
6773 CFLAGS="$save_CFLAGS"
6774 CC="$ac_save_cc"
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6776$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006777 ;;
6778 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006779
6780 if test $ac_cv_disable_unused_result_warning = yes
6781 then
6782 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6783 fi
6784
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6786$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6787 ac_save_cc="$CC"
6788 CC="$CC -Werror=declaration-after-statement"
6789 save_CFLAGS="$CFLAGS"
6790 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6791 $as_echo_n "(cached) " >&6
6792else
6793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794/* end confdefs.h. */
6795
6796
6797int
6798main ()
6799{
6800
6801 ;
6802 return 0;
6803}
6804
6805_ACEOF
6806if ac_fn_c_try_compile "$LINENO"; then :
6807
6808 ac_cv_declaration_after_statement_warning=yes
6809
6810else
6811
6812 ac_cv_declaration_after_statement_warning=no
6813
6814fi
6815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6816fi
6817
6818 CFLAGS="$save_CFLAGS"
6819 CC="$ac_save_cc"
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6821$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6822
6823 if test $ac_cv_declaration_after_statement_warning = yes
6824 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006825 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006826 fi
6827
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6829$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6830 ac_save_cc="$CC"
6831 CC="$CC -Wsign-compare"
6832 save_CFLAGS="$CFLAGS"
6833 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6834 $as_echo_n "(cached) " >&6
6835else
6836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6837/* end confdefs.h. */
6838
6839
6840int
6841main ()
6842{
6843
6844 ;
6845 return 0;
6846}
6847
6848_ACEOF
6849if ac_fn_c_try_compile "$LINENO"; then :
6850
6851 ac_cv_enable_sign_compare_warning=yes
6852
6853else
6854
6855 ac_cv_enable_sign_compare_warning=no
6856
6857fi
6858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6859fi
6860
6861 CFLAGS="$save_CFLAGS"
6862 CC="$ac_save_cc"
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6864$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6865
6866 if test $ac_cv_enable_sign_compare_warning = yes
6867 then
6868 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6869 fi
6870
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6872$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6873 ac_save_cc="$CC"
6874 CC="$CC -Wunreachable-code"
6875 save_CFLAGS="$CFLAGS"
6876 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6877 $as_echo_n "(cached) " >&6
6878else
6879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880/* end confdefs.h. */
6881
6882
6883int
6884main ()
6885{
6886
6887 ;
6888 return 0;
6889}
6890
6891_ACEOF
6892if ac_fn_c_try_compile "$LINENO"; then :
6893
6894 ac_cv_enable_unreachable_code_warning=yes
6895
6896else
6897
6898 ac_cv_enable_unreachable_code_warning=no
6899
6900fi
6901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6902fi
6903
6904 CFLAGS="$save_CFLAGS"
6905 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006906
6907 # Don't enable unreachable code warning in debug mode, since it usually
6908 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006909 # Issue #24324: Unfortunately, the unreachable code warning does not work
6910 # correctly on gcc and has been silently removed from the compiler.
6911 # It is supported on clang but on OS X systems gcc may be an alias
6912 # for clang. Try to determine if the compiler is not really gcc and,
6913 # if so, only then enable the warning.
6914 if test $ac_cv_enable_unreachable_code_warning = yes && \
6915 test "$Py_DEBUG" != "true" && \
6916 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006917 then
6918 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006919 else
6920 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006921 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6923$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6926 # support. Without this, treatment of subnormals doesn't follow
6927 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006928 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929 alpha*)
6930 BASECFLAGS="$BASECFLAGS -mieee"
6931 ;;
6932 esac
6933
6934 case $ac_sys_system in
6935 SCO_SV*)
6936 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6937 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006938
6939 # is there any other compiler on Darwin besides gcc?
6940 Darwin*)
6941 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6942 # used to be here, but non-Apple gcc doesn't accept them.
6943 if test "${CC}" = gcc
6944 then
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006946$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006947 case "${UNIVERSALSDK}" in
6948 */MacOSX10.4u.sdk)
6949 # Build using 10.4 SDK, force usage of gcc when the
6950 # compiler is gcc, otherwise the user will get very
6951 # confusing error messages when building on OSX 10.6
6952 CC=gcc-4.0
6953 CPP=cpp-4.0
6954 ;;
6955 esac
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006957$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006958 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959
Ned Deily87adb6e2013-10-18 21:09:56 -07006960 if test "${enable_universalsdk}"
6961 then
6962 case "$UNIVERSAL_ARCHS" in
6963 32-bit)
6964 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6965 LIPO_32BIT_FLAGS=""
6966 ARCH_RUN_32BIT=""
6967 ;;
6968 64-bit)
6969 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6970 LIPO_32BIT_FLAGS=""
6971 ARCH_RUN_32BIT="true"
6972 ;;
6973 all)
6974 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6975 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6976 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6977 ;;
6978 intel)
6979 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6980 LIPO_32BIT_FLAGS="-extract i386"
6981 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6982 ;;
6983 intel-32)
6984 UNIVERSAL_ARCH_FLAGS="-arch i386"
6985 LIPO_32BIT_FLAGS=""
6986 ARCH_RUN_32BIT=""
6987 ;;
6988 3-way)
6989 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6990 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6991 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6992 ;;
6993 *)
6994 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6995 ;;
6996 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997
Ned Deily87adb6e2013-10-18 21:09:56 -07006998 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6999 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7000 if test "${UNIVERSALSDK}" != "/"
7001 then
7002 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7003 fi
7004 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005
Ned Deily87adb6e2013-10-18 21:09:56 -07007006 # Calculate an appropriate deployment target for this build:
7007 # The deployment target value is used explicitly to enable certain
7008 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007009 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007010 # component of the string returned by distutils.get_platform().
7011 #
7012 # Use the value from:
7013 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7014 # 2. the operating system version of the build machine if >= 10.6
7015 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7016 # below to pick either 10.3, 10.4, or 10.5 as the target.
7017 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018
Ned Deily87adb6e2013-10-18 21:09:56 -07007019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7020$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007021 cur_target_major=`sw_vers -productVersion | \
7022 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7023 cur_target_minor=`sw_vers -productVersion | \
7024 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7025 cur_target="${cur_target_major}.${cur_target_minor}"
7026 if test ${cur_target_major} -eq 10 && \
7027 test ${cur_target_minor} -ge 3 && \
7028 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007029 then
Ned Deily36820b62014-06-25 13:44:22 -07007030 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007031 cur_target=10.3
7032 if test ${enable_universalsdk}
7033 then
7034 case "$UNIVERSAL_ARCHS" in
7035 all|3-way|intel|64-bit)
7036 # These configurations were first supported in 10.5
7037 cur_target='10.5'
7038 ;;
7039 esac
7040 else
7041 if test `/usr/bin/arch` = "i386"
7042 then
7043 # 10.4 was the first release to support Intel archs
7044 cur_target="10.4"
7045 fi
7046 fi
7047 fi
7048 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007049
Ned Deily87adb6e2013-10-18 21:09:56 -07007050 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7051 # environment with a value that is the same as what we'll use
7052 # in the Makefile to ensure that we'll get the same compiler
7053 # environment during configure and build time.
7054 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7055 export MACOSX_DEPLOYMENT_TARGET
7056 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7058$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007059
Ned Deily87adb6e2013-10-18 21:09:56 -07007060 # end of Darwin* tests
7061 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007062 esac
7063 ;;
7064
7065*)
7066 case $ac_sys_system in
7067 OpenUNIX*|UnixWare*)
7068 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7069 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007070 SCO_SV*)
7071 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7072 ;;
7073 esac
7074 ;;
7075esac
7076
Zachary Ware5af85642015-12-21 12:09:17 -06007077# ICC needs -fp-model strict or floats behave badly
7078case "$CC" in
7079*icc*)
7080 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7081 ;;
7082esac
7083
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007084if test "$Py_DEBUG" = 'true'; then
7085 :
7086else
7087 OPT="-DNDEBUG $OPT"
7088fi
7089
7090if test "$ac_arch_flags"
7091then
7092 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7093fi
7094
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095# On some compilers, pthreads are available without further options
7096# (e.g. MacOS X). On some of these systems, the compiler will not
7097# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7098# So we have to see first whether pthreads are available without
7099# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7101$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007102if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007106 ac_cv_pthread_is_default=no
7107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109/* end confdefs.h. */
7110
Stefan Krah7dba5942012-11-22 22:49:11 +01007111#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007112#include <pthread.h>
7113
7114void* routine(void* p){return NULL;}
7115
7116int main(){
7117 pthread_t p;
7118 if(pthread_create(&p,NULL,routine,NULL)!=0)
7119 return 1;
7120 (void)pthread_detach(p);
7121 return 0;
7122}
7123
7124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007125if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126
7127 ac_cv_pthread_is_default=yes
7128 ac_cv_kthread=no
7129 ac_cv_pthread=no
7130
7131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7135 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136fi
7137
7138
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007139fi
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7142$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007143
7144
7145if test $ac_cv_pthread_is_default = yes
7146then
7147 ac_cv_kpthread=no
7148else
7149# -Kpthread, if available, provides the right #defines
7150# and linker options to make pthread_create available
7151# Some compilers won't report that they do not support -Kpthread,
7152# so we need to run a program to see whether it really made the
7153# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7155$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007156if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007158else
7159 ac_save_cc="$CC"
7160CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007161if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007162 ac_cv_kpthread=no
7163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165/* end confdefs.h. */
7166
Stefan Krah7dba5942012-11-22 22:49:11 +01007167#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168#include <pthread.h>
7169
7170void* routine(void* p){return NULL;}
7171
7172int main(){
7173 pthread_t p;
7174 if(pthread_create(&p,NULL,routine,NULL)!=0)
7175 return 1;
7176 (void)pthread_detach(p);
7177 return 0;
7178}
7179
7180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007181if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 ac_cv_kpthread=yes
7183else
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188fi
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190CC="$ac_save_cc"
7191fi
7192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7194$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007195fi
7196
7197if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7198then
7199# -Kthread, if available, provides the right #defines
7200# and linker options to make pthread_create available
7201# Some compilers won't report that they do not support -Kthread,
7202# so we need to run a program to see whether it really made the
7203# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7205$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007206if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007208else
7209 ac_save_cc="$CC"
7210CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007211if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212 ac_cv_kthread=no
7213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215/* end confdefs.h. */
7216
Stefan Krah7dba5942012-11-22 22:49:11 +01007217#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218#include <pthread.h>
7219
7220void* routine(void* p){return NULL;}
7221
7222int main(){
7223 pthread_t p;
7224 if(pthread_create(&p,NULL,routine,NULL)!=0)
7225 return 1;
7226 (void)pthread_detach(p);
7227 return 0;
7228}
7229
7230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232 ac_cv_kthread=yes
7233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238fi
7239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240CC="$ac_save_cc"
7241fi
7242
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7244$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245fi
7246
7247if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7248then
7249# -pthread, if available, provides the right #defines
7250# and linker options to make pthread_create available
7251# Some compilers won't report that they do not support -pthread,
7252# so we need to run a program to see whether it really made the
7253# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7255$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007256if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258else
7259 ac_save_cc="$CC"
7260CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007261if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262 ac_cv_pthread=no
7263else
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265/* end confdefs.h. */
7266
Stefan Krah7dba5942012-11-22 22:49:11 +01007267#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268#include <pthread.h>
7269
7270void* routine(void* p){return NULL;}
7271
7272int main(){
7273 pthread_t p;
7274 if(pthread_create(&p,NULL,routine,NULL)!=0)
7275 return 1;
7276 (void)pthread_detach(p);
7277 return 0;
7278}
7279
7280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007281if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282 ac_cv_pthread=yes
7283else
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7287 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288fi
7289
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290CC="$ac_save_cc"
7291fi
7292
Matthias Kloseb9621712010-04-24 17:59:49 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7294$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295fi
7296
7297# If we have set a CC compiler flag for thread support then
7298# check if it works for CXX, too.
7299ac_cv_cxx_thread=no
7300if test ! -z "$CXX"
7301then
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7303$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304ac_save_cxx="$CXX"
7305
7306if test "$ac_cv_kpthread" = "yes"
7307then
7308 CXX="$CXX -Kpthread"
7309 ac_cv_cxx_thread=yes
7310elif test "$ac_cv_kthread" = "yes"
7311then
7312 CXX="$CXX -Kthread"
7313 ac_cv_cxx_thread=yes
7314elif test "$ac_cv_pthread" = "yes"
7315then
7316 CXX="$CXX -pthread"
7317 ac_cv_cxx_thread=yes
7318fi
7319
7320if test $ac_cv_cxx_thread = yes
7321then
7322 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7323 $CXX -c conftest.$ac_ext 2>&5
7324 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7325 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7326 then
7327 ac_cv_cxx_thread=yes
7328 else
7329 ac_cv_cxx_thread=no
7330 fi
7331 rm -fr conftest*
7332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7334$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335fi
7336CXX="$ac_save_cxx"
7337
7338
7339# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7341$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007342if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344else
Matthias Kloseb9621712010-04-24 17:59:49 +00007345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346/* end confdefs.h. */
7347#include <stdlib.h>
7348#include <stdarg.h>
7349#include <string.h>
7350#include <float.h>
7351
7352int
7353main ()
7354{
7355
7356 ;
7357 return 0;
7358}
7359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007360if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361 ac_cv_header_stdc=yes
7362else
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7366
7367if test $ac_cv_header_stdc = yes; then
7368 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370/* end confdefs.h. */
7371#include <string.h>
7372
7373_ACEOF
7374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $EGREP "memchr" >/dev/null 2>&1; then :
7376
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377else
7378 ac_cv_header_stdc=no
7379fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007380rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381
7382fi
7383
7384if test $ac_cv_header_stdc = yes; then
7385 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387/* end confdefs.h. */
7388#include <stdlib.h>
7389
7390_ACEOF
7391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $EGREP "free" >/dev/null 2>&1; then :
7393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394else
7395 ac_cv_header_stdc=no
7396fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007397rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
7399fi
7400
7401if test $ac_cv_header_stdc = yes; then
7402 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404 :
7405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407/* end confdefs.h. */
7408#include <ctype.h>
7409#include <stdlib.h>
7410#if ((' ' & 0x0FF) == 0x020)
7411# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7412# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7413#else
7414# define ISLOWER(c) \
7415 (('a' <= (c) && (c) <= 'i') \
7416 || ('j' <= (c) && (c) <= 'r') \
7417 || ('s' <= (c) && (c) <= 'z'))
7418# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7419#endif
7420
7421#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7422int
7423main ()
7424{
7425 int i;
7426 for (i = 0; i < 256; i++)
7427 if (XOR (islower (i), ISLOWER (i))
7428 || toupper (i) != TOUPPER (i))
7429 return 2;
7430 return 0;
7431}
7432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007433if ac_fn_c_try_run "$LINENO"; then :
7434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435else
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7439 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440fi
7441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442fi
7443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7445$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446if test $ac_cv_header_stdc = yes; then
7447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
7450fi
7451
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007452for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007453fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007454ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007455sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007456unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007457poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007458sys/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 +01007459sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007460sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007461sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007462sys/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 -07007463libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007464bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007465sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007466do :
7467 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7468ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007469if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007470 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007471#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007472_ACEOF
7473
7474fi
7475
Guido van Rossum627b2d71993-12-24 10:39:16 +00007476done
7477
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007478ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007479for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7482$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007483if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007487/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007488#include <sys/types.h>
7489#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
7494if ((DIR *) 0)
7495return 0;
7496 ;
7497 return 0;
7498}
7499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007501 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007502else
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507eval ac_res=\$$as_ac_Header
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7509$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007510if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007512#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
7514
7515ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007516fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518done
7519# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7520if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7522$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007523if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007525else
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530/* Override any GCC internal prototype to avoid an error.
7531 Use char because int might match the return type of a GCC
7532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007533#ifdef __cplusplus
7534extern "C"
7535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007536char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007537int
7538main ()
7539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007541 ;
7542 return 0;
7543}
7544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545for ac_lib in '' dir; do
7546 if test -z "$ac_lib"; then
7547 ac_res="none required"
7548 else
7549 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007550 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555rm -f core conftest.err conftest.$ac_objext \
7556 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007557 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560done
Victor Stinnere0be4232011-10-25 13:06:09 +02007561if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007563else
7564 ac_cv_search_opendir=no
7565fi
7566rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007567LIBS=$ac_func_search_save_LIBS
7568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7570$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007574
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007576
Michael W. Hudson54241132001-12-07 15:38:26 +00007577else
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7579$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007580if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
7583 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587/* Override any GCC internal prototype to avoid an error.
7588 Use char because int might match the return type of a GCC
7589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007590#ifdef __cplusplus
7591extern "C"
7592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007593char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 ;
7599 return 0;
7600}
7601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602for ac_lib in '' x; do
7603 if test -z "$ac_lib"; then
7604 ac_res="none required"
7605 else
7606 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007607 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612rm -f core conftest.err conftest.$ac_objext \
7613 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007614 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617done
Victor Stinnere0be4232011-10-25 13:06:09 +02007618if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620else
7621 ac_cv_search_opendir=no
7622fi
7623rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007624LIBS=$ac_func_search_save_LIBS
7625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7627$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632fi
7633
7634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7637$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007638if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007642/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007643#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007644int
7645main ()
7646{
7647return makedev(0, 0);
7648 ;
7649 return 0;
7650}
7651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007653 ac_cv_header_sys_types_h_makedev=yes
7654else
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007657rm -f core conftest.err conftest.$ac_objext \
7658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007659
7660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7662$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007663
7664if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007665ac_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 +02007666if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007669
7670fi
7671
7672
7673
7674 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 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 +02007676if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007677
Matthias Kloseb9621712010-04-24 17:59:49 +00007678$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007679
7680fi
7681
7682
7683 fi
7684fi
7685
Michael W. Hudson54241132001-12-07 15:38:26 +00007686
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007687# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7688for ac_header in net/if.h
7689do :
7690 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7691#ifdef STDC_HEADERS
7692# include <stdlib.h>
7693# include <stddef.h>
7694#else
7695# ifdef HAVE_STDLIB_H
7696# include <stdlib.h>
7697# endif
7698#endif
7699#ifdef HAVE_SYS_SOCKET_H
7700# include <sys/socket.h>
7701#endif
7702
7703"
Victor Stinnere0be4232011-10-25 13:06:09 +02007704if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007705 cat >>confdefs.h <<_ACEOF
7706#define HAVE_NET_IF_H 1
7707_ACEOF
7708
7709fi
7710
7711done
7712
7713
Martin v. Löwis11017b12006-01-14 18:12:57 +00007714# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007715for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007716do :
7717 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 +00007718#ifdef HAVE_ASM_TYPES_H
7719#include <asm/types.h>
7720#endif
7721#ifdef HAVE_SYS_SOCKET_H
7722#include <sys/socket.h>
7723#endif
7724
Matthias Kloseb9621712010-04-24 17:59:49 +00007725"
Victor Stinnere0be4232011-10-25 13:06:09 +02007726if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007727 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007728#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007729_ACEOF
7730
7731fi
7732
7733done
7734
7735
Charles-François Natali47413c12011-10-06 19:47:44 +02007736# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007737for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007738do :
7739 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7740ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7741#ifdef HAVE_SYS_SOCKET_H
7742#include <sys/socket.h>
7743#endif
7744
7745"
7746if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7747 cat >>confdefs.h <<_ACEOF
7748#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7749_ACEOF
7750
7751fi
7752
7753done
7754
7755
Guido van Rossum627b2d71993-12-24 10:39:16 +00007756# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007757was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7759$as_echo_n "checking for clock_t in time.h... " >&6; }
7760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007761/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007763
7764_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007767 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768else
Martin v. Löwis11437992002-04-12 09:54:03 +00007769
7770
Matthias Kloseb9621712010-04-24 17:59:49 +00007771$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007772
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007773
Guido van Rossum627b2d71993-12-24 10:39:16 +00007774fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007775rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7778$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007779
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7781$as_echo_n "checking for makedev... " >&6; }
7782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007783/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007784
Jesus Cea740f53a2010-04-28 11:35:30 +00007785#if defined(MAJOR_IN_MKDEV)
7786#include <sys/mkdev.h>
7787#elif defined(MAJOR_IN_SYSMACROS)
7788#include <sys/sysmacros.h>
7789#else
7790#include <sys/types.h>
7791#endif
7792
Neal Norwitz11690112002-07-30 01:08:28 +00007793int
7794main ()
7795{
Jesus Cea740f53a2010-04-28 11:35:30 +00007796
7797 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007798 ;
7799 return 0;
7800}
Matthias Kloseb159a552010-04-25 21:00:44 +00007801
Neal Norwitz11690112002-07-30 01:08:28 +00007802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007803if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007804 ac_cv_has_makedev=yes
7805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808rm -f core conftest.err conftest.$ac_objext \
7809 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7811$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007812if test "$ac_cv_has_makedev" = "yes"; then
7813
Matthias Kloseb9621712010-04-24 17:59:49 +00007814$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007815
7816fi
7817
Christian Heimes985ecdc2013-11-20 11:46:18 +01007818# byte swapping
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7820$as_echo_n "checking for le64toh... " >&6; }
7821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7822/* end confdefs.h. */
7823
7824#ifdef HAVE_ENDIAN_H
7825#include <endian.h>
7826#elif defined(HAVE_SYS_ENDIAN_H)
7827#include <sys/endian.h>
7828#endif
7829
7830int
7831main ()
7832{
7833
7834 le64toh(1)
7835 ;
7836 return 0;
7837}
7838
7839_ACEOF
7840if ac_fn_c_try_link "$LINENO"; then :
7841 ac_cv_has_le64toh=yes
7842else
7843 ac_cv_has_le64toh=no
7844fi
7845rm -f core conftest.err conftest.$ac_objext \
7846 conftest$ac_exeext conftest.$ac_ext
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7848$as_echo "$ac_cv_has_le64toh" >&6; }
7849if test "$ac_cv_has_le64toh" = "yes"; then
7850
7851$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7852
7853fi
7854
Martin v. Löwis399a6892002-10-04 10:22:02 +00007855# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7856# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7857# defined, but the compiler does not support pragma redefine_extname,
7858# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7859# structures (such as rlimit64) without declaring them. As a
7860# work-around, disable LFS on such configurations
7861
7862use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7864$as_echo_n "checking Solaris LFS bug... " >&6; }
7865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007866/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007867
7868#define _LARGEFILE_SOURCE 1
7869#define _FILE_OFFSET_BITS 64
7870#include <sys/resource.h>
7871
Martin v. Löwis399a6892002-10-04 10:22:02 +00007872int
7873main ()
7874{
7875struct rlimit foo;
7876 ;
7877 return 0;
7878}
7879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007881 sol_lfs_bug=no
7882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7887$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007888if test "$sol_lfs_bug" = "yes"; then
7889 use_lfs=no
7890fi
7891
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007892# Don't use largefile support for GNU/Hurd
7893case $ac_sys_system in GNU*)
7894 use_lfs=no
7895esac
7896
Martin v. Löwis399a6892002-10-04 10:22:02 +00007897if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007898# Two defines needed to enable largefile support on various platforms
7899# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007900case $ac_sys_system/$ac_sys_release in
7901AIX*)
7902
7903$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7904
7905 ;;
7906esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
7910
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007912
Martin v. Löwis399a6892002-10-04 10:22:02 +00007913fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007914
Guido van Rossum84e7b241996-08-19 21:59:00 +00007915# Add some code to confdefs.h so that the test for off_t works on SCO
7916cat >> confdefs.h <<\EOF
7917#if defined(SCO_DS)
7918#undef _OFF_T
7919#endif
7920EOF
7921
Guido van Rossumef2255b2000-03-10 22:30:29 +00007922# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007923ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007924if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007925
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927
7928cat >>confdefs.h <<_ACEOF
7929#define mode_t int
7930_ACEOF
7931
7932fi
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007935if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007937else
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
7939cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007941_ACEOF
7942
7943fi
7944
Matthias Kloseb9621712010-04-24 17:59:49 +00007945ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007946if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007948else
Martin v. Löwis11437992002-04-12 09:54:03 +00007949
7950cat >>confdefs.h <<_ACEOF
7951#define pid_t int
7952_ACEOF
7953
7954fi
7955
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007958#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007959_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007960
Matthias Kloseb9621712010-04-24 17:59:49 +00007961ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964else
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
7966cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007968_ACEOF
7969
7970fi
7971
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7973$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
7981_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007984 ac_cv_type_uid_t=yes
7985else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007986 ac_cv_type_uid_t=no
7987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007988rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7992$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007993if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007996
7997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007999
8000fi
8001
Mark Dickinson983bc162012-12-02 12:11:38 +00008002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008004if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005
Matthias Kloseb9621712010-04-24 17:59:49 +00008006$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008007
8008fi
8009
Stefan Krah1919b7e2012-03-21 18:25:23 +01008010ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8011if test "x$ac_cv_type___uint128_t" = xyes; then :
8012
8013$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8014
8015fi
8016
Jack Jansendd19cf82001-12-06 22:36:17 +00008017
Michael W. Hudson54241132001-12-07 15:38:26 +00008018# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008019# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020# The cast to long int works around a bug in the HP C Compiler
8021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8025$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008028else
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 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 +00008030
Martin v. Löwis11437992002-04-12 09:54:03 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 if test "$ac_cv_type_int" = yes; then
8033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008035as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008036See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 else
8038 ac_cv_sizeof_int=0
8039 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041
Martin v. Löwis11437992002-04-12 09:54:03 +00008042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8044$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045
8046
8047
Martin v. Löwis11437992002-04-12 09:54:03 +00008048cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008049#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008050_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008051
8052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053# The cast to long int works around a bug in the HP C Compiler
8054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8056# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8058$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008061else
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 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 +00008063
Martin v. Löwis11437992002-04-12 09:54:03 +00008064else
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 if test "$ac_cv_type_long" = yes; then
8066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008068as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008069See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070 else
8071 ac_cv_sizeof_long=0
8072 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8077$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078
8079
8080
Martin v. Löwis11437992002-04-12 09:54:03 +00008081cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008082#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008083_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008084
8085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086# The cast to long int works around a bug in the HP C Compiler
8087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8089# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8091$as_echo_n "checking size of long long... " >&6; }
8092if ${ac_cv_sizeof_long_long+:} false; then :
8093 $as_echo_n "(cached) " >&6
8094else
8095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8096
8097else
8098 if test "$ac_cv_type_long_long" = yes; then
8099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8101as_fn_error 77 "cannot compute sizeof (long long)
8102See \`config.log' for more details" "$LINENO" 5; }
8103 else
8104 ac_cv_sizeof_long_long=0
8105 fi
8106fi
8107
8108fi
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8110$as_echo "$ac_cv_sizeof_long_long" >&6; }
8111
8112
8113
8114cat >>confdefs.h <<_ACEOF
8115#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8116_ACEOF
8117
8118
8119# The cast to long int works around a bug in the HP C Compiler
8120# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8121# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8122# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8124$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008125if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008127else
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 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 +00008129
Martin v. Löwis11437992002-04-12 09:54:03 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 if test "$ac_cv_type_void_p" = yes; then
8132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008134as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008135See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136 else
8137 ac_cv_sizeof_void_p=0
8138 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8143$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144
8145
8146
Martin v. Löwis11437992002-04-12 09:54:03 +00008147cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008148#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008149_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008150
8151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152# The cast to long int works around a bug in the HP C Compiler
8153# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8154# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8155# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8157$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008158if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008160else
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 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 +00008162
Martin v. Löwis11437992002-04-12 09:54:03 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 if test "$ac_cv_type_short" = yes; then
8165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008167as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008168See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169 else
8170 ac_cv_sizeof_short=0
8171 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173
Martin v. Löwis11437992002-04-12 09:54:03 +00008174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8176$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177
8178
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008181#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008182_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008183
8184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008185# The cast to long int works around a bug in the HP C Compiler
8186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8188# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8190$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008191if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008193else
Matthias Kloseb9621712010-04-24 17:59:49 +00008194 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 +00008195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 if test "$ac_cv_type_float" = yes; then
8198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008200as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008201See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 else
8203 ac_cv_sizeof_float=0
8204 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8209$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210
8211
8212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008214#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008215_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008216
8217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218# The cast to long int works around a bug in the HP C Compiler
8219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8223$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008224if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 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 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 if test "$ac_cv_type_double" = yes; then
8231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008233as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008234See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 else
8236 ac_cv_sizeof_double=0
8237 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8242$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243
8244
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008247#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008248_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008249
8250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251# The cast to long int works around a bug in the HP C Compiler
8252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8254# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8256$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008257if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008259else
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 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 +00008261
Martin v. Löwis11437992002-04-12 09:54:03 +00008262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 if test "$ac_cv_type_fpos_t" = yes; then
8264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008266as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008267See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268 else
8269 ac_cv_sizeof_fpos_t=0
8270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8275$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276
8277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008280#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008282
Michael W. Hudson54241132001-12-07 15:38:26 +00008283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284# The cast to long int works around a bug in the HP C Compiler
8285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8287# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8289$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008290if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008292else
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 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 +00008294
Martin v. Löwis18e16552006-02-15 17:27:45 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 if test "$ac_cv_type_size_t" = yes; then
8297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008299as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008300See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301 else
8302 ac_cv_sizeof_size_t=0
8303 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008305
Martin v. Löwis18e16552006-02-15 17:27:45 +00008306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8308$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309
8310
8311
Martin v. Löwis18e16552006-02-15 17:27:45 +00008312cat >>confdefs.h <<_ACEOF
8313#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8314_ACEOF
8315
8316
Christian Heimes400adb02008-02-01 08:12:03 +00008317# The cast to long int works around a bug in the HP C Compiler
8318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8322$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008323if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 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 +00008327
Christian Heimes400adb02008-02-01 08:12:03 +00008328else
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 if test "$ac_cv_type_pid_t" = yes; then
8330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008332as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008333See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008334 else
8335 ac_cv_sizeof_pid_t=0
8336 fi
8337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338
Christian Heimes400adb02008-02-01 08:12:03 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8341$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008342
8343
8344
8345cat >>confdefs.h <<_ACEOF
8346#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8347_ACEOF
8348
8349
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008350# The cast to long int works around a bug in the HP C Compiler
8351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8353# This bug is HP SR number 8606223364.
8354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8355$as_echo_n "checking size of uintptr_t... " >&6; }
8356if ${ac_cv_sizeof_uintptr_t+:} false; then :
8357 $as_echo_n "(cached) " >&6
8358else
8359 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8360
8361else
8362 if test "$ac_cv_type_uintptr_t" = yes; then
8363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8365as_fn_error 77 "cannot compute sizeof (uintptr_t)
8366See \`config.log' for more details" "$LINENO" 5; }
8367 else
8368 ac_cv_sizeof_uintptr_t=0
8369 fi
8370fi
8371
8372fi
8373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8374$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8375
8376
8377
8378cat >>confdefs.h <<_ACEOF
8379#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8380_ACEOF
8381
8382
Michael W. Hudson54241132001-12-07 15:38:26 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8385$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008386have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008388/* end confdefs.h. */
8389
8390int
8391main ()
8392{
8393long double x; x = (long double)0;
8394 ;
8395 return 0;
8396}
8397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008398if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008399
8400
Matthias Kloseb9621712010-04-24 17:59:49 +00008401$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008402
8403 have_long_double=yes
8404
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008405fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8408$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008409if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008410# The cast to long int works around a bug in the HP C Compiler
8411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8415$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 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 +00008420
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 if test "$ac_cv_type_long_double" = yes; then
8423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008426See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008427 else
8428 ac_cv_sizeof_long_double=0
8429 fi
8430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8434$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008435
8436
8437
8438cat >>confdefs.h <<_ACEOF
8439#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8440_ACEOF
8441
8442
8443fi
8444
8445
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8447$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008448have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008450/* end confdefs.h. */
8451
8452int
8453main ()
8454{
8455_Bool x; x = (_Bool)0;
8456 ;
8457 return 0;
8458}
8459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008460if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008461
8462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008464
8465 have_c99_bool=yes
8466
Thomas Woutersb2137042007-02-01 18:02:27 +00008467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8470$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008471if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472# The cast to long int works around a bug in the HP C Compiler
8473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8475# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8477$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008478if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008480else
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 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 +00008482
Thomas Woutersb2137042007-02-01 18:02:27 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 if test "$ac_cv_type__Bool" = yes; then
8485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008487as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008488See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489 else
8490 ac_cv_sizeof__Bool=0
8491 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493
Thomas Woutersb2137042007-02-01 18:02:27 +00008494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8496$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497
8498
8499
Thomas Woutersb2137042007-02-01 18:02:27 +00008500cat >>confdefs.h <<_ACEOF
8501#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8502_ACEOF
8503
8504
8505fi
8506
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008507# The cast to long int works around a bug in the HP C Compiler
8508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8510# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8512$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008513if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008515else
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008517#ifdef HAVE_SYS_TYPES_H
8518#include <sys/types.h>
8519#endif
8520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008522
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008523else
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 if test "$ac_cv_type_off_t" = yes; then
8525 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008527as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008528See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008529 else
8530 ac_cv_sizeof_off_t=0
8531 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8536$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008538
8539
Martin v. Löwis11437992002-04-12 09:54:03 +00008540cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008541#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008542_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008543
Michael W. Hudson54241132001-12-07 15:38:26 +00008544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8547$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008548if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008549 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008550
Matthias Kloseb9621712010-04-24 17:59:49 +00008551$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8554$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8557$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008558fi
8559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008560# The cast to long int works around a bug in the HP C Compiler
8561# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8562# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8563# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8565$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008566if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008568else
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008570#ifdef HAVE_SYS_TYPES_H
8571#include <sys/types.h>
8572#endif
8573#ifdef HAVE_TIME_H
8574#include <time.h>
8575#endif
8576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008578
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 if test "$ac_cv_type_time_t" = yes; then
8581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008583as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008584See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008585 else
8586 ac_cv_sizeof_time_t=0
8587 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8592$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008594
8595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008597#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008598_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008599
Michael W. Hudson54241132001-12-07 15:38:26 +00008600
8601
Trent Mick635f6fb2000-08-23 21:33:05 +00008602# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008603ac_save_cc="$CC"
8604if test "$ac_cv_kpthread" = "yes"
8605then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008606elif test "$ac_cv_kthread" = "yes"
8607then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008608elif test "$ac_cv_pthread" = "yes"
8609then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008610fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8613$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008614have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008616/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008617
8618 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008619int
8620main ()
8621{
Guido van Rossum12580492000-09-24 16:47:19 +00008622pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ;
8624 return 0;
8625}
Matthias Kloseb159a552010-04-25 21:00:44 +00008626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008628if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008629 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8633$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008634if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8640$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008641if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008645#ifdef HAVE_PTHREAD_H
8646#include <pthread.h>
8647#endif
8648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008650
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 if test "$ac_cv_type_pthread_t" = yes; then
8653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008655as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008656See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008657 else
8658 ac_cv_sizeof_pthread_t=0
8659 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661
Trent Mick635f6fb2000-08-23 21:33:05 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8664$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008665
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008666
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008669#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008670_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008671
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008672
Trent Mick635f6fb2000-08-23 21:33:05 +00008673fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008674CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008675
Michael W. Hudson54241132001-12-07 15:38:26 +00008676
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008677case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008678 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008679 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8680 ;;
8681 Darwin/*)
8682 OTHER_LIBTOOL_OPT=""
8683 ;;
8684esac
8685
8686
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008687
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008688case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008689 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008690 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8691 if test "${enable_universalsdk}"; then
8692 :
8693 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008694 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008695 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008696 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008697 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008698 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008699 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008700 if test ${gcc_version} '<' 4.0
8701 then
8702 LIBTOOL_CRUFT="-lcc_dynamic"
8703 else
8704 LIBTOOL_CRUFT=""
8705 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008707 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008710/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008711
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008712 #include <unistd.h>
8713 int main(int argc, char*argv[])
8714 {
8715 if (sizeof(long) == 4) {
8716 return 0;
8717 } else {
8718 return 1;
8719 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008720 }
8721
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008723if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008724 ac_osx_32bit=yes
8725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008730fi
8731
8732
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008733 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008734 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008735 i386)
8736 MACOSX_DEFAULT_ARCH="i386"
8737 ;;
8738 ppc)
8739 MACOSX_DEFAULT_ARCH="ppc"
8740 ;;
8741 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008742 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008743 ;;
8744 esac
8745 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008746 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008747 i386)
8748 MACOSX_DEFAULT_ARCH="x86_64"
8749 ;;
8750 ppc)
8751 MACOSX_DEFAULT_ARCH="ppc64"
8752 ;;
8753 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008754 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008755 ;;
8756 esac
8757
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008758 fi
8759
8760 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008761 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008762 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008763esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8765$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008766if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008767then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008768 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008770 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008773
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8775$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008776 if test $enable_shared = "yes"
8777 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008778 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 +00008779 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008783fi
8784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8786$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008787case $ac_sys_system/$ac_sys_release in
8788 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8793$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008794 ;;
8795 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8797$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008798 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008799esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008800
Guido van Rossum0a516c91994-09-12 10:58:40 +00008801# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008802
Michael W. Hudson54241132001-12-07 15:38:26 +00008803
8804
8805
8806
Benjamin Peterson99f03762010-04-11 22:15:28 +00008807
Thomas Wouters477c8d52006-05-27 19:21:47 +00008808
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008809# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8810# -- usually .so, .sl on HP-UX, .dll on Cygwin
8811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8812$as_echo_n "checking the extension of shared libraries... " >&6; }
8813if test -z "$SHLIB_SUFFIX"; then
8814 case $ac_sys_system in
8815 hp*|HP*)
8816 case `uname -m` in
8817 ia64) SHLIB_SUFFIX=.so;;
8818 *) SHLIB_SUFFIX=.sl;;
8819 esac
8820 ;;
8821 CYGWIN*) SHLIB_SUFFIX=.dll;;
8822 *) SHLIB_SUFFIX=.so;;
8823 esac
8824fi
8825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8826$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008827
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008829# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008830# (Shared libraries in this instance are shared modules to be loaded into
8831# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8833$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008834if test -z "$LDSHARED"
8835then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008836 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008837 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008838 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008839 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008840 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008841 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008842 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008844 if test "$GCC" = "yes" ; then
8845 LDSHARED='$(CC) -shared'
8846 LDCXXSHARED='$(CXX) -shared'
8847 else
8848 LDSHARED='$(CC) -G'
8849 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008850 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008851 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008852 if test "$GCC" = "yes" ; then
8853 LDSHARED='$(CC) -shared'
8854 LDCXXSHARED='$(CXX) -shared'
8855 else
8856 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008857 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008858 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008859 LDSHARED='$(CC) -bundle'
8860 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008861 if test "$enable_framework" ; then
8862 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008863 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8864 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008865 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008866 else
8867 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008868 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008869 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008870 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008871 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008872 LDSHARED='$(CC) -bundle'
8873 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008874 if test "$enable_framework" ; then
8875 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008876 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8877 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008878 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008879 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008880 # No framework, use the Python app as bundle-loader
8881 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008882 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008883 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008884 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008885 Darwin/*)
8886 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8887 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008888
Ned Deily36820b62014-06-25 13:44:22 -07008889 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8890 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8891 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8892 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8893 if test ${dep_target_major} -eq 10 && \
8894 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008895 then
Ned Deily36820b62014-06-25 13:44:22 -07008896 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008897 LDSHARED='$(CC) -bundle'
8898 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008899 if test "$enable_framework" ; then
8900 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008901 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8902 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008903 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008904 else
8905 # No framework, use the Python app as bundle-loader
8906 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8907 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008908 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008909 fi
Ned Deily36820b62014-06-25 13:44:22 -07008910 else
8911 # building for OS X 10.3 and later
8912 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8913 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8914 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008915 fi
8916 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008917 Linux*|GNU*|QNX*)
8918 LDSHARED='$(CC) -shared'
8919 LDCXXSHARED='$(CXX) -shared';;
8920 BSD/OS*/4*)
8921 LDSHARED="gcc -shared"
8922 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008923 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008924 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008925 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008926 LDSHARED='$(CC) -shared'
8927 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008928 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008929 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008930 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008931 OpenBSD*)
8932 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8933 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008934 LDSHARED='$(CC) -shared $(CCSHARED)'
8935 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008936 else
8937 case `uname -r` in
8938 [01].* | 2.[0-7] | 2.[0-7].*)
8939 LDSHARED="ld -Bshareable ${LDFLAGS}"
8940 ;;
8941 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008942 LDSHARED='$(CC) -shared $(CCSHARED)'
8943 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008944 ;;
8945 esac
8946 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008947 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008948 LDSHARED='$(CC) -shared'
8949 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008950 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008951 if test "$GCC" = "yes" ; then
8952 LDSHARED='$(CC) -shared'
8953 LDCXXSHARED='$(CXX) -shared'
8954 else
8955 LDSHARED='$(CC) -G'
8956 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008957 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008958 SCO_SV*)
8959 LDSHARED='$(CC) -Wl,-G,-Bexport'
8960 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8961 CYGWIN*)
8962 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8963 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008964 *) LDSHARED="ld";;
8965 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8968$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008969LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008970BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008971# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008972# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8974$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008975if test -z "$CCSHARED"
8976then
Guido van Rossum07397971997-04-29 21:49:50 +00008977 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008978 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008979 then CCSHARED="-fPIC";
8980 elif test `uname -p` = sparc;
8981 then CCSHARED="-xcode=pic32";
8982 else CCSHARED="-Kpic";
8983 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008984 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008985 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008986 else CCSHARED="+z";
8987 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008988 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008989 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008990 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008991 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008992 if test "$GCC" = "yes"
8993 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008994 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008995 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008996 SCO_SV*)
8997 if test "$GCC" = "yes"
8998 then CCSHARED="-fPIC"
8999 else CCSHARED="-Kpic -belf"
9000 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009001 IRIX*/6*) case $CC in
9002 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009003 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009004 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009005 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9008$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009009# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009010# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9012$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009013if test -z "$LINKFORSHARED"
9014then
Guido van Rossum07397971997-04-29 21:49:50 +00009015 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009016 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009017 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009018 LINKFORSHARED="-Wl,-E -Wl,+s";;
9019# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009020 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009021 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009022 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009024 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009025
9026 # Issue #18075: the default maximum stack size (8MBytes) is too
9027 # small for the default recursion limit. Increase the stack size
9028 # to ensure that tests don't crash
9029 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9030
Jack Jansene578a632001-08-15 01:27:14 +00009031 if test "$enable_framework"
9032 then
Jack Jansenda49e192005-01-07 13:08:22 +00009033 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009034 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009035 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009036 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009037 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009038 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009039 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009040 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9041 then
9042 LINKFORSHARED="-Wl,--export-dynamic"
9043 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009044 SunOS/5*) case $CC in
9045 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009046 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009047 then
9048 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009049 fi;;
9050 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009051 CYGWIN*)
9052 if test $enable_shared = "no"
9053 then
9054 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9055 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009056 QNX*)
9057 # -Wl,-E causes the symbols to be added to the dynamic
9058 # symbol table so that they can be found when a module
9059 # is loaded. -N 2048K causes the stack size to be set
9060 # to 2048 kilobytes so that the stack doesn't overflow
9061 # when running test_compile.py.
9062 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009063 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9066$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009067
Michael W. Hudson54241132001-12-07 15:38:26 +00009068
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9071$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009072if test ! "$LIBRARY" = "$LDLIBRARY"
9073then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009074 case $ac_sys_system in
9075 CYGWIN*)
9076 # Cygwin needs CCSHARED when building extension DLLs
9077 # but not when building the interpreter DLL.
9078 CFLAGSFORSHARED='';;
9079 *)
9080 CFLAGSFORSHARED='$(CCSHARED)'
9081 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9084$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009085
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009086# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9087# library (with --enable-shared).
9088# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009089# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9090# if it is not required, since it creates a dependency of the shared library
9091# to LIBS. This, in turn, means that applications linking the shared libpython
9092# don't need to link LIBS explicitly. The default should be only changed
9093# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9096$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009097case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009098 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009099 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009100esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9102$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009103
9104
Guido van Rossum627b2d71993-12-24 10:39:16 +00009105# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9107$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009108if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009109 $as_echo_n "(cached) " >&6
9110else
9111 ac_check_lib_save_LIBS=$LIBS
9112LIBS="-lsendfile $LIBS"
9113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9114/* end confdefs.h. */
9115
9116/* Override any GCC internal prototype to avoid an error.
9117 Use char because int might match the return type of a GCC
9118 builtin and then its argument prototype would still apply. */
9119#ifdef __cplusplus
9120extern "C"
9121#endif
9122char sendfile ();
9123int
9124main ()
9125{
9126return sendfile ();
9127 ;
9128 return 0;
9129}
9130_ACEOF
9131if ac_fn_c_try_link "$LINENO"; then :
9132 ac_cv_lib_sendfile_sendfile=yes
9133else
9134 ac_cv_lib_sendfile_sendfile=no
9135fi
9136rm -f core conftest.err conftest.$ac_objext \
9137 conftest$ac_exeext conftest.$ac_ext
9138LIBS=$ac_check_lib_save_LIBS
9139fi
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9141$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009142if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009143 cat >>confdefs.h <<_ACEOF
9144#define HAVE_LIBSENDFILE 1
9145_ACEOF
9146
9147 LIBS="-lsendfile $LIBS"
9148
9149fi
9150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9152$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009153if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009154 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009155else
Martin v. Löwis11437992002-04-12 09:54:03 +00009156 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009157LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161/* Override any GCC internal prototype to avoid an error.
9162 Use char because int might match the return type of a GCC
9163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009164#ifdef __cplusplus
9165extern "C"
9166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009167char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009168int
9169main ()
9170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ;
9173 return 0;
9174}
9175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009176if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009178else
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009181rm -f core conftest.err conftest.$ac_objext \
9182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9186$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009187if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 cat >>confdefs.h <<_ACEOF
9189#define HAVE_LIBDL 1
9190_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009191
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009192 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009194fi
9195 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9197$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009198if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009199 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009200else
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009202LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206/* Override any GCC internal prototype to avoid an error.
9207 Use char because int might match the return type of a GCC
9208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009209#ifdef __cplusplus
9210extern "C"
9211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009212char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ;
9218 return 0;
9219}
9220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009223else
Matthias Kloseb9621712010-04-24 17:59:49 +00009224 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009226rm -f core conftest.err conftest.$ac_objext \
9227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009228LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9231$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009232if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 cat >>confdefs.h <<_ACEOF
9234#define HAVE_LIBDLD 1
9235_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009236
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009237 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009239fi
9240 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009241
Georg Brandlb1441c72009-01-03 22:33:39 +00009242# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009243if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9245$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009246if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009247 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009248else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009249 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253/* Override any GCC internal prototype to avoid an error.
9254 Use char because int might match the return type of a GCC
9255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009256#ifdef __cplusplus
9257extern "C"
9258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009259char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009260int
9261main ()
9262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 ;
9265 return 0;
9266}
9267_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268for ac_lib in '' pthread rt posix4; do
9269 if test -z "$ac_lib"; then
9270 ac_res="none required"
9271 else
9272 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009273 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278rm -f core conftest.err conftest.$ac_objext \
9279 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009280 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283done
Victor Stinnere0be4232011-10-25 13:06:09 +02009284if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286else
9287 ac_cv_search_sem_init=no
9288fi
9289rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009290LIBS=$ac_func_search_save_LIBS
9291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9293$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009295if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009297
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009298fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009299 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009300 # posix4 on Solaris 2.6
9301 # pthread (first!) on Linux
9302fi
9303
Martin v. Löwis19d17342003-06-14 21:03:05 +00009304# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9306$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009307if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009309else
9310 ac_check_lib_save_LIBS=$LIBS
9311LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009313/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315/* Override any GCC internal prototype to avoid an error.
9316 Use char because int might match the return type of a GCC
9317 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009318#ifdef __cplusplus
9319extern "C"
9320#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009321char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009322int
9323main ()
9324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009326 ;
9327 return 0;
9328}
9329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009331 ac_cv_lib_intl_textdomain=yes
9332else
Matthias Kloseb9621712010-04-24 17:59:49 +00009333 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009335rm -f core conftest.err conftest.$ac_objext \
9336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009337LIBS=$ac_check_lib_save_LIBS
9338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9340$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009341if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009344
Brett Cannonc6d936e2009-06-07 20:09:53 +00009345 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009346fi
9347
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009348
9349# checks for system dependent C++ extensions support
9350case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9352$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009354/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009355
Georg Brandl59e87bd2011-02-15 19:48:59 +00009356 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009357int
9358main ()
9359{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009360loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ;
9362 return 0;
9363}
Matthias Kloseb159a552010-04-25 21:00:44 +00009364
Martin v. Löwis11437992002-04-12 09:54:03 +00009365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009366if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009367
Matthias Kloseb159a552010-04-25 21:00:44 +00009368
Matthias Kloseb9621712010-04-24 17:59:49 +00009369$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009370
Matthias Kloseb159a552010-04-25 21:00:44 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009373
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009374else
Matthias Kloseb159a552010-04-25 21:00:44 +00009375
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009378
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009380rm -f core conftest.err conftest.$ac_objext \
9381 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009382 *) ;;
9383esac
9384
Christian Heimes985ecdc2013-11-20 11:46:18 +01009385# check for systems that require aligned memory access
9386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9387$as_echo_n "checking aligned memory access is required... " >&6; }
9388if test "$cross_compiling" = yes; then :
9389 aligned_required=yes
9390else
9391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392/* end confdefs.h. */
9393
9394int main()
9395{
9396 char s[16];
9397 int i, *p1, *p2;
9398 for (i=0; i < 16; i++)
9399 s[i] = i;
9400 p1 = (int*)(s+1);
9401 p2 = (int*)(s+2);
9402 if (*p1 == *p2)
9403 return 1;
9404 return 0;
9405}
9406
9407_ACEOF
9408if ac_fn_c_try_run "$LINENO"; then :
9409 aligned_required=no
9410else
9411 aligned_required=yes
9412fi
9413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9414 conftest.$ac_objext conftest.beam conftest.$ac_ext
9415fi
9416
9417
9418if test "$aligned_required" = yes ; then
9419
9420$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9421
9422fi
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9424$as_echo "$aligned_required" >&6; }
9425
9426
9427# str, bytes and memoryview hash algorithm
9428
9429
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9431$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9432
9433# Check whether --with-hash_algorithm was given.
9434if test "${with_hash_algorithm+set}" = set; then :
9435 withval=$with_hash_algorithm;
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9437$as_echo "$withval" >&6; }
9438case "$withval" in
9439 siphash24)
9440 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9441
9442 ;;
9443 fnv)
9444 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9445
9446 ;;
9447 *)
9448 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9449 ;;
9450esac
9451
9452else
9453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9454$as_echo "default" >&6; }
9455fi
9456
9457
Charles-François Natalid30b0222014-05-08 23:08:51 +01009458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9459$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9460
9461# Check whether --with-address_sanitizer was given.
9462if test "${with_address_sanitizer+set}" = set; then :
9463 withval=$with_address_sanitizer;
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9465$as_echo "$withval" >&6; }
9466BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9467LDFLAGS="-fsanitize=address $LDFLAGS"
9468
9469else
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9471$as_echo "no" >&6; }
9472fi
9473
9474
Guido van Rossum70c7f481998-03-26 18:44:10 +00009475# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9477$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009478if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009480else
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009482LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486/* Override any GCC internal prototype to avoid an error.
9487 Use char because int might match the return type of a GCC
9488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489#ifdef __cplusplus
9490extern "C"
9491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009492char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493int
9494main ()
9495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009503else
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506rm -f core conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9511$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009512if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009513 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009514fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009515 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9517$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9551$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009553 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009554fi
9555 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009556
Matthias Kloseb9621712010-04-24 17:59:49 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9558$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009561if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9564$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009565LIBS="$withval $LIBS"
9566
9567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570fi
9571
Guido van Rossum7f43da71994-08-01 12:15:30 +00009572
Victor Stinner8291b5e2015-03-20 16:03:14 +01009573
9574
9575
9576
9577
9578
9579
9580if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9581 if test -n "$ac_tool_prefix"; then
9582 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9583set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9585$as_echo_n "checking for $ac_word... " >&6; }
9586if ${ac_cv_path_PKG_CONFIG+:} false; then :
9587 $as_echo_n "(cached) " >&6
9588else
9589 case $PKG_CONFIG in
9590 [\\/]* | ?:[\\/]*)
9591 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9592 ;;
9593 *)
9594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9595for as_dir in $PATH
9596do
9597 IFS=$as_save_IFS
9598 test -z "$as_dir" && as_dir=.
9599 for ac_exec_ext in '' $ac_executable_extensions; do
9600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9601 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9603 break 2
9604 fi
9605done
9606 done
9607IFS=$as_save_IFS
9608
9609 ;;
9610esac
9611fi
9612PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9613if test -n "$PKG_CONFIG"; then
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9615$as_echo "$PKG_CONFIG" >&6; }
9616else
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618$as_echo "no" >&6; }
9619fi
9620
9621
9622fi
9623if test -z "$ac_cv_path_PKG_CONFIG"; then
9624 ac_pt_PKG_CONFIG=$PKG_CONFIG
9625 # Extract the first word of "pkg-config", so it can be a program name with args.
9626set dummy pkg-config; ac_word=$2
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9628$as_echo_n "checking for $ac_word... " >&6; }
9629if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9630 $as_echo_n "(cached) " >&6
9631else
9632 case $ac_pt_PKG_CONFIG in
9633 [\\/]* | ?:[\\/]*)
9634 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9635 ;;
9636 *)
9637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9638for as_dir in $PATH
9639do
9640 IFS=$as_save_IFS
9641 test -z "$as_dir" && as_dir=.
9642 for ac_exec_ext in '' $ac_executable_extensions; do
9643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9644 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9646 break 2
9647 fi
9648done
9649 done
9650IFS=$as_save_IFS
9651
9652 ;;
9653esac
9654fi
9655ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9656if test -n "$ac_pt_PKG_CONFIG"; then
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9658$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9659else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9661$as_echo "no" >&6; }
9662fi
9663
9664 if test "x$ac_pt_PKG_CONFIG" = x; then
9665 PKG_CONFIG=""
9666 else
9667 case $cross_compiling:$ac_tool_warned in
9668yes:)
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9671ac_tool_warned=yes ;;
9672esac
9673 PKG_CONFIG=$ac_pt_PKG_CONFIG
9674 fi
9675else
9676 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9677fi
9678
9679fi
9680if test -n "$PKG_CONFIG"; then
9681 _pkg_min_version=0.9.0
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9683$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9684 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9686$as_echo "yes" >&6; }
9687 else
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690 PKG_CONFIG=""
9691 fi
9692fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009693
9694# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9696$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009697
9698# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009699if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009700 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009701else
9702 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009703fi
9704
9705
Matthias Kloseb9621712010-04-24 17:59:49 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9707$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009708
9709# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9711$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009712
9713# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009714if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009715 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009716else
9717 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009718fi
9719
9720
9721if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009722 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9723else
9724 LIBFFI_INCLUDEDIR=""
9725fi
9726
9727
Matthias Kloseb9621712010-04-24 17:59:49 +00009728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9729$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009730
Stefan Krah60187b52012-03-23 19:06:27 +01009731# Check for use of the system libmpdec library
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9733$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9734
9735# Check whether --with-system_libmpdec was given.
9736if test "${with_system_libmpdec+set}" = set; then :
9737 withval=$with_system_libmpdec;
9738else
9739 with_system_libmpdec="no"
9740fi
9741
9742
9743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9744$as_echo "$with_system_libmpdec" >&6; }
9745
Benjamin Peterson076ed002010-10-31 17:11:02 +00009746# Check for support for loadable sqlite extensions
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9748$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9749# Check whether --enable-loadable-sqlite-extensions was given.
9750if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9751 enableval=$enable_loadable_sqlite_extensions;
9752else
9753 enable_loadable_sqlite_extensions="no"
9754fi
9755
9756
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9758$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9759
Ned Deilyd819b932013-09-06 01:07:05 -07009760# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9761
9762
9763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9764$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9765
9766# Check whether --with-tcltk-includes was given.
9767if test "${with_tcltk_includes+set}" = set; then :
9768 withval=$with_tcltk_includes;
9769else
9770 with_tcltk_includes="default"
9771fi
9772
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9774$as_echo "$with_tcltk_includes" >&6; }
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9776$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9777
9778# Check whether --with-tcltk-libs was given.
9779if test "${with_tcltk_libs+set}" = set; then :
9780 withval=$with_tcltk_libs;
9781else
9782 with_tcltk_libs="default"
9783fi
9784
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9786$as_echo "$with_tcltk_libs" >&6; }
9787if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9788then
9789 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9790 then
9791 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9792 fi
9793 TCLTK_INCLUDES=""
9794 TCLTK_LIBS=""
9795else
9796 TCLTK_INCLUDES="$with_tcltk_includes"
9797 TCLTK_LIBS="$with_tcltk_libs"
9798fi
9799
Matthias Klose55708cc2009-04-30 08:06:49 +00009800# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9802$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009803
9804# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009805if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009806 withval=$with_dbmliborder;
9807if test x$with_dbmliborder = xyes
9808then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009809as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009810else
9811 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9812 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9813 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009814 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009815 fi
9816 done
9817fi
9818fi
9819
Matthias Kloseb9621712010-04-24 17:59:49 +00009820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9821$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009822
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009823# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009824
9825
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9827$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009830if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 withval=$with_signal_module;
9832fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009833
9834
9835if test -z "$with_signal_module"
9836then with_signal_module="yes"
9837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9839$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009840
9841if test "${with_signal_module}" = "yes"; then
9842 USE_SIGNAL_MODULE=""
9843 SIGNAL_OBJS=""
9844else
9845 USE_SIGNAL_MODULE="#"
9846 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9847fi
9848
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009849# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009850
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009851USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853
Martin v. Löwis11437992002-04-12 09:54:03 +00009854
9855# Templates for things AC_DEFINEd more than once.
9856# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009857
9858
Martin v. Löwis11437992002-04-12 09:54:03 +00009859
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9861$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009864if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 withval=$with_threads;
9866fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009867
9868
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009869# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009872if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873 withval=$with_thread; with_threads=$with_thread
9874fi
9875
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009876
9877if test -z "$with_threads"
9878then with_threads="yes"
9879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9881$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009882
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009883
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009884if test "$with_threads" = "no"
9885then
9886 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009887elif test "$ac_cv_pthread_is_default" = yes
9888then
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009890
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009891 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009893
9894 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009896elif test "$ac_cv_kpthread" = "yes"
9897then
9898 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009899 if test "$ac_cv_cxx_thread" = "yes"; then
9900 CXX="$CXX -Kpthread"
9901 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009903
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009904 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009905 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009906elif test "$ac_cv_kthread" = "yes"
9907then
9908 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009909 if test "$ac_cv_cxx_thread" = "yes"; then
9910 CXX="$CXX -Kthread"
9911 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009913
9914 posix_threads=yes
9915 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009916elif test "$ac_cv_pthread" = "yes"
9917then
9918 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009919 if test "$ac_cv_cxx_thread" = "yes"; then
9920 CXX="$CXX -pthread"
9921 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009923
9924 posix_threads=yes
9925 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009926else
9927 if test ! -z "$with_threads" -a -d "$with_threads"
9928 then LDFLAGS="$LDFLAGS -L$with_threads"
9929 fi
9930 if test ! -z "$withval" -a -d "$withval"
9931 then LDFLAGS="$LDFLAGS -L$withval"
9932 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009933
9934 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009935 # define _POSIX_THREADS in unistd.h. Some apparently don't
9936 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9938$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009940/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009941
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009942#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009943#ifdef _POSIX_THREADS
9944yes
9945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009946
9947_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009950 unistd_defines_pthreads=yes
9951else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009952 unistd_defines_pthreads=no
9953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009954rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009955
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9957$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009958
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009960
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009961 # Just looking for pthread_create in libpthread is not enough:
9962 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9963 # So we really have to include pthread.h, and then link.
9964 _libs=$LIBS
9965 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9967$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009969/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009970
9971#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009972#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009973
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009974void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009975int
9976main ()
9977{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009978
9979pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 ;
9981 return 0;
9982}
9983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9987$as_echo "yes" >&6; }
9988 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009989
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009990 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009991 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009992else
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009994 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009996if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009998
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009999 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010000 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010001else
Guido van Rossumad678af1998-10-02 14:42:15 +000010002
Matthias Kloseb9621712010-04-24 17:59:49 +000010003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10004$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010005if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010007else
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010009LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013/* Override any GCC internal prototype to avoid an error.
10014 Use char because int might match the return type of a GCC
10015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010016#ifdef __cplusplus
10017extern "C"
10018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010019char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010020int
10021main ()
10022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 ;
10025 return 0;
10026}
10027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010030else
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010033rm -f core conftest.err conftest.$ac_objext \
10034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010035LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10038$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010039if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010040 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010041
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010042 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010043 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010044 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010045else
Greg Steinadf63d62000-07-05 10:38:09 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10048$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010049if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010051else
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010053LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057/* Override any GCC internal prototype to avoid an error.
10058 Use char because int might match the return type of a GCC
10059 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010060#ifdef __cplusplus
10061extern "C"
10062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010063char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010064int
10065main ()
10066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 ;
10069 return 0;
10070}
10071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010072if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010074else
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077rm -f core conftest.err conftest.$ac_objext \
10078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010079LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10082$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010083if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010085
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010086 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010087 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010088 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010089else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010090
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10092$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010093if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010095else
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010097LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101/* Override any GCC internal prototype to avoid an error.
10102 Use char because int might match the return type of a GCC
10103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010104#ifdef __cplusplus
10105extern "C"
10106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010107char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010108int
10109main ()
10110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 ;
10113 return 0;
10114}
10115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010118else
Matthias Kloseb9621712010-04-24 17:59:49 +000010119 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010121rm -f core conftest.err conftest.$ac_objext \
10122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010123LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10126$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010127if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010129
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010130 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010131 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010132 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010133else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10136$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010137if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010139else
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010141LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145/* Override any GCC internal prototype to avoid an error.
10146 Use char because int might match the return type of a GCC
10147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010148#ifdef __cplusplus
10149extern "C"
10150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010151char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010152int
10153main ()
10154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ;
10157 return 0;
10158}
10159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010162else
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165rm -f core conftest.err conftest.$ac_objext \
10166 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10170$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010171if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010173
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010174 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010175 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010176 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010177else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010178
Martin v. Löwis130fb172001-07-19 11:00:41 +000010179 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010180fi
10181
Guido van Rossum627b2d71993-12-24 10:39:16 +000010182
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010183fi
10184
Guido van Rossum0be3e491997-05-22 20:33:33 +000010185fi
10186
Guido van Rossum49545951997-12-02 19:28:29 +000010187fi
10188
Guido van Rossumb93a8621998-05-07 13:27:32 +000010189fi
10190
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10196$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010201LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205/* Override any GCC internal prototype to avoid an error.
10206 Use char because int might match the return type of a GCC
10207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#ifdef __cplusplus
10209extern "C"
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010222else
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225rm -f core conftest.err conftest.$ac_objext \
10226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010227LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10230$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010231if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010233
Martin v. Löwis130fb172001-07-19 11:00:41 +000010234 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010235 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010237fi
10238
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010239
Neal Norwitza978ab02002-11-02 16:58:05 +000010240 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10242$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010243if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010245else
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010247LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251/* Override any GCC internal prototype to avoid an error.
10252 Use char because int might match the return type of a GCC
10253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010254#ifdef __cplusplus
10255extern "C"
10256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010257char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010258int
10259main ()
10260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ;
10263 return 0;
10264}
10265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010268else
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010271rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010273LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10276$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010277if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010279
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010280 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010281 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010282 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010283fi
10284
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010285 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010286fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010287
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010288if test "$posix_threads" = "yes"; then
10289 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010292
10293 fi
10294
10295 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10296 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010297 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010299
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010300 ;;
10301 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010302$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010303
10304 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010305 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010306$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010307
10308 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010309 esac
10310
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10312$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010313 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010315else
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010317 ac_cv_pthread_system_supported=no
10318else
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010321
10322 #include <stdio.h>
10323 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324 void *foo(void *parm) {
10325 return NULL;
10326 }
10327 main() {
10328 pthread_attr_t attr;
10329 pthread_t id;
10330 if (pthread_attr_init(&attr)) exit(-1);
10331 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10332 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10333 exit(0);
10334 }
10335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010336if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010337 ac_cv_pthread_system_supported=yes
10338else
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010343fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345
Guido van Rossum627b2d71993-12-24 10:39:16 +000010346fi
10347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10349$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010350 if test "$ac_cv_pthread_system_supported" = "yes"; then
10351
Matthias Kloseb9621712010-04-24 17:59:49 +000010352$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010353
10354 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 for ac_func in pthread_sigmask
10356do :
10357 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010359 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010361_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010362 case $ac_sys_system in
10363 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010366
10367 ;;
10368 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010369fi
10370done
10371
Christian Heimesf77b4b22013-08-21 13:26:05 +020010372 for ac_func in pthread_atfork
10373do :
10374 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10375if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10376 cat >>confdefs.h <<_ACEOF
10377#define HAVE_PTHREAD_ATFORK 1
10378_ACEOF
10379
10380fi
10381done
10382
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010383fi
10384
10385
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010386# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10389$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010391if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010393 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010396 ipv6=no
10397 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010398 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10399$as_echo "yes" >&6; }
10400 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010401
10402 ipv6=yes
10403 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405else
Martin v. Löwis11437992002-04-12 09:54:03 +000010406
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010408/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010409 /* AF_INET6 available check */
10410#include <sys/types.h>
10411#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010412int
10413main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010414{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010415int domain = AF_INET6;
10416 ;
10417 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010418}
Martin v. Löwis11437992002-04-12 09:54:03 +000010419_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010420if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010421
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10423$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010424 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010425
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010426else
Matthias Kloseb159a552010-04-25 21:00:44 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010430 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010432fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010435if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10437$as_echo_n "checking if RFC2553 API is available... " >&6; }
10438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010440
10441 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010442#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010443int
10444main ()
10445{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010446struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010447 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 ;
10449 return 0;
10450}
Matthias Kloseb159a552010-04-25 21:00:44 +000010451
Martin v. Löwis11437992002-04-12 09:54:03 +000010452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010453if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010454
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010456$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010457 ipv6=yes
10458
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010459else
Matthias Kloseb159a552010-04-25 21:00:44 +000010460
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010463 ipv6=no
10464
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010467fi
10468
10469if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010471
10472fi
10473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474fi
10475
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010476
10477ipv6type=unknown
10478ipv6lib=none
10479ipv6trylibc=no
10480
10481if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10483$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010484 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10485 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010486 case $i in
10487 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010489/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010490
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010491#include <netinet/in.h>
10492#ifdef IPV6_INRIA_VERSION
10493yes
10494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010495_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010498 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010500rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010501
10502 ;;
10503 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010506
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010507#include <netinet/in.h>
10508#ifdef __KAME__
10509yes
10510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010514 ipv6type=$i;
10515 ipv6lib=inet6
10516 ipv6libdir=/usr/local/v6/lib
10517 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010518fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010519rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010520
10521 ;;
10522 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010524/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010525
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526#include <features.h>
10527#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10528yes
10529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010530_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533 ipv6type=$i;
10534 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010535fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010536rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010537
10538 ;;
10539 linux-inet6)
10540 if test -d /usr/inet6; then
10541 ipv6type=$i
10542 ipv6lib=inet6
10543 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010544 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010545 fi
10546 ;;
10547 solaris)
10548 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010549 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010550 ipv6type=$i
10551 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552 fi
10553 fi
10554 ;;
10555 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010558
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010559#include <sys/param.h>
10560#ifdef _TOSHIBA_INET6
10561yes
10562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010563_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010566 ipv6type=$i;
10567 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010568 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010570rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571
10572 ;;
10573 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010576
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577#include </usr/local/v6/include/sys/v6config.h>
10578#ifdef __V6D__
10579yes
10580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010581_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584 ipv6type=$i;
10585 ipv6lib=v6;
10586 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010587 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010589rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590
10591 ;;
10592 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010595
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010596#include <sys/param.h>
10597#ifdef _ZETA_MINAMI_INET6
10598yes
10599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010600_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603 ipv6type=$i;
10604 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010605 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010607rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010608
10609 ;;
10610 esac
10611 if test "$ipv6type" != "unknown"; then
10612 break
10613 fi
10614 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10616$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617fi
10618
10619if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10620 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10621 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10622 echo "using lib$ipv6lib"
10623 else
10624 if test $ipv6trylibc = "yes"; then
10625 echo "using libc"
10626 else
10627 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10628 echo "You need to fetch lib$ipv6lib.a from appropriate"
10629 echo 'ipv6 kit and compile beforehand.'
10630 exit 1
10631 fi
10632 fi
10633fi
10634
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10636$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10638/* end confdefs.h. */
10639 /* CAN_RAW_FD_FRAMES available check */
10640#include <linux/can/raw.h>
10641int
10642main ()
10643{
10644int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10645 ;
10646 return 0;
10647}
10648_ACEOF
10649if ac_fn_c_try_compile "$LINENO"; then :
10650
10651
10652$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10653
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10655$as_echo "yes" >&6; }
10656
10657else
10658
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661
10662fi
10663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10666$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010668/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010669
10670 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010671int
10672main ()
10673{
10674FSIORefNum fRef = 0
10675 ;
10676 return 0;
10677}
Matthias Kloseb159a552010-04-25 21:00:44 +000010678
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010681
Matthias Kloseb159a552010-04-25 21:00:44 +000010682
Matthias Kloseb9621712010-04-24 17:59:49 +000010683$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10686$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010687
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010688else
Matthias Kloseb159a552010-04-25 21:00:44 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010692
10693fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10695
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010696# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10698$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010701if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 withval=$with_doc_strings;
10703fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010704
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010705
10706if test -z "$with_doc_strings"
10707then with_doc_strings="yes"
10708fi
10709if test "$with_doc_strings" != "no"
10710then
10711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010713
10714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10716$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010717
Antoine Pitrou042b1282010-08-13 21:15:58 +000010718# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10720$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010725if test "$withval" != no
10726then
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10731$as_echo "yes" >&6; }
10732else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010734fi
10735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738fi
10739
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010740
10741# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10743$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010746if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747 withval=$with_pymalloc;
10748fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010749
Neil Schemenauera35c6882001-02-27 04:45:05 +000010750
Neil Schemenauer16c22972002-03-22 15:34:49 +000010751if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010752then
10753 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010754fi
10755if test "$with_pymalloc" != "no"
10756then
Martin v. Löwis11437992002-04-12 09:54:03 +000010757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010759
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010760 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10763$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010764
Benjamin Peterson05159c42009-12-03 03:01:27 +000010765# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10767$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010768
10769# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010770if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010771 withval=$with_valgrind;
10772else
10773 with_valgrind=no
10774fi
10775
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10777$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010778if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 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 +020010780if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010783
10784else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010785 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010786
10787fi
10788
10789
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010790 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010791fi
10792
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010793# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010794
Guido van Rossum98935bf2001-09-05 19:13:16 +000010795DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010796
Guido van Rossume97ee181999-12-20 21:27:22 +000010797# the dlopen() function means we might want to use dynload_shlib.o. some
10798# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010799for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010800do :
10801 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010802if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010803 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010804#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010805_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010806
Guido van Rossume97ee181999-12-20 21:27:22 +000010807fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010808done
Guido van Rossume97ee181999-12-20 21:27:22 +000010809
Michael W. Hudson54241132001-12-07 15:38:26 +000010810
Guido van Rossume97ee181999-12-20 21:27:22 +000010811# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10812# loading of modules.
10813
Matthias Kloseb9621712010-04-24 17:59:49 +000010814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10815$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010816if test -z "$DYNLOADFILE"
10817then
10818 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010819 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10820 if test "$ac_cv_func_dlopen" = yes
10821 then DYNLOADFILE="dynload_shlib.o"
10822 else DYNLOADFILE="dynload_aix.o"
10823 fi
10824 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010825 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010826 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10827 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010828 *)
10829 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10830 # out any dynamic loading
10831 if test "$ac_cv_func_dlopen" = yes
10832 then DYNLOADFILE="dynload_shlib.o"
10833 else DYNLOADFILE="dynload_stub.o"
10834 fi
10835 ;;
10836 esac
10837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10839$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010840if test "$DYNLOADFILE" != "dynload_stub.o"
10841then
Martin v. Löwis11437992002-04-12 09:54:03 +000010842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010844
10845fi
10846
Neil Schemenauer4e425612001-06-19 15:44:15 +000010847# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10848
Michael W. Hudson54241132001-12-07 15:38:26 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10851$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010852if test -z "$MACHDEP_OBJS"
10853then
Jack Jansene578a632001-08-15 01:27:14 +000010854 MACHDEP_OBJS=$extra_machdep_objs
10855else
10856 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010857fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010858if test -z "$MACHDEP_OBJS"; then
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10860$as_echo "none" >&6; }
10861else
10862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10863$as_echo "$MACHDEP_OBJS" >&6; }
10864fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010865
Guido van Rossum627b2d71993-12-24 10:39:16 +000010866# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010867for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010868 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010869 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010870 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010871 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010872 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010873 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010874 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10875 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010876 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010877 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010878 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010879 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010880 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010881 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010882 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10883 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010884 sigaction sigaltstack siginterrupt sigpending sigrelse \
10885 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010886 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010887 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010888 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010889do :
10890 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10891ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010892if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010894#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010895_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010896
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010897fi
10898done
10899
Michael W. Hudson54241132001-12-07 15:38:26 +000010900
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010901ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10902 #include <dirent.h>
10903"
10904if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10905
10906$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10907
10908fi
10909
10910
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010911# For some functions, having a definition is not sufficient, since
10912# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10914$as_echo_n "checking for chroot... " >&6; }
10915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010916/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010917#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010918int
10919main ()
10920{
10921void *x=chroot
10922 ;
10923 return 0;
10924}
10925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010926if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010929
Matthias Kloseb159a552010-04-25 21:00:44 +000010930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010931$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010932else
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10934$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010935
10936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10939$as_echo_n "checking for link... " >&6; }
10940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010942#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010943int
10944main ()
10945{
10946void *x=link
10947 ;
10948 return 0;
10949}
10950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010951if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010952
Matthias Kloseb9621712010-04-24 17:59:49 +000010953$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010954
Matthias Kloseb159a552010-04-25 21:00:44 +000010955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010956$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010957else
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010960
10961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10964$as_echo_n "checking for symlink... " >&6; }
10965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010967#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010968int
10969main ()
10970{
10971void *x=symlink
10972 ;
10973 return 0;
10974}
10975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010976if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010979
Matthias Kloseb159a552010-04-25 21:00:44 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010981$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010982else
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010985
10986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10989$as_echo_n "checking for fchdir... " >&6; }
10990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010991/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010992#include <unistd.h>
10993int
10994main ()
10995{
10996void *x=fchdir
10997 ;
10998 return 0;
10999}
11000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011004
Matthias Kloseb159a552010-04-25 21:00:44 +000011005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011007else
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11009$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011010
11011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11014$as_echo_n "checking for fsync... " >&6; }
11015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011016/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011017#include <unistd.h>
11018int
11019main ()
11020{
11021void *x=fsync
11022 ;
11023 return 0;
11024}
11025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011026if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011029
Matthias Kloseb159a552010-04-25 21:00:44 +000011030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011031$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011032else
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011035
11036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11039$as_echo_n "checking for fdatasync... " >&6; }
11040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011041/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011042#include <unistd.h>
11043int
11044main ()
11045{
11046void *x=fdatasync
11047 ;
11048 return 0;
11049}
11050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011054
Matthias Kloseb159a552010-04-25 21:00:44 +000011055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011056$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011057else
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11059$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011060
11061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11064$as_echo_n "checking for epoll... " >&6; }
11065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011066/* end confdefs.h. */
11067#include <sys/epoll.h>
11068int
11069main ()
11070{
11071void *x=epoll_create
11072 ;
11073 return 0;
11074}
11075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011079
Matthias Kloseb159a552010-04-25 21:00:44 +000011080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011081$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011085
11086fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11089$as_echo_n "checking for epoll_create1... " >&6; }
11090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11091/* end confdefs.h. */
11092#include <sys/epoll.h>
11093int
11094main ()
11095{
11096void *x=epoll_create1
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101if ac_fn_c_try_compile "$LINENO"; then :
11102
11103$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11104
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11106$as_echo "yes" >&6; }
11107else
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11109$as_echo "no" >&6; }
11110
11111fi
11112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11114$as_echo_n "checking for kqueue... " >&6; }
11115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011116/* end confdefs.h. */
11117
11118#include <sys/types.h>
11119#include <sys/event.h>
11120
11121int
11122main ()
11123{
11124int x=kqueue()
11125 ;
11126 return 0;
11127}
11128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011129if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011130
Matthias Kloseb9621712010-04-24 17:59:49 +000011131$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011132
Matthias Kloseb159a552010-04-25 21:00:44 +000011133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011134$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011138
11139fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11142$as_echo_n "checking for prlimit... " >&6; }
11143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11144/* end confdefs.h. */
11145
11146#include <sys/time.h>
11147#include <sys/resource.h>
11148
11149int
11150main ()
11151{
11152void *x=prlimit
11153 ;
11154 return 0;
11155}
11156_ACEOF
11157if ac_fn_c_try_compile "$LINENO"; then :
11158
11159$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11160
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11162$as_echo "yes" >&6; }
11163else
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165$as_echo "no" >&6; }
11166
11167fi
11168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11169
Martin v. Löwisd5843682002-11-21 20:41:28 +000011170# On some systems (eg. FreeBSD 5), we would find a definition of the
11171# functions ctermid_r, setgroups in the library, but no prototype
11172# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11173# address to avoid compiler warnings and potential miscompilations
11174# because of the missing prototypes.
11175
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11177$as_echo_n "checking for ctermid_r... " >&6; }
11178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011180
Martin v. Löwisd5843682002-11-21 20:41:28 +000011181#include <stdio.h>
11182
Martin v. Löwisd5843682002-11-21 20:41:28 +000011183int
11184main ()
11185{
11186void* p = ctermid_r
11187 ;
11188 return 0;
11189}
11190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011194
Matthias Kloseb159a552010-04-25 21:00:44 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011197else
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011200
11201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11203
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11205$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011206if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011207 $as_echo_n "(cached) " >&6
11208else
11209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011210/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011211#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011212int
11213main ()
11214{
11215void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011216
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011217 ;
11218 return 0;
11219}
11220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011222 ac_cv_flock_decl=yes
11223else
11224 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011225
11226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011228
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011229fi
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11231$as_echo "$ac_cv_flock_decl" >&6; }
11232if test "x${ac_cv_flock_decl}" = xyes; then
11233 for ac_func in flock
11234do :
11235 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011236if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011237 cat >>confdefs.h <<_ACEOF
11238#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011239_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011240
Antoine Pitroua3000072010-09-07 14:52:42 +000011241else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011243$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011244if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011245 $as_echo_n "(cached) " >&6
11246else
11247 ac_check_lib_save_LIBS=$LIBS
11248LIBS="-lbsd $LIBS"
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11250/* end confdefs.h. */
11251
11252/* Override any GCC internal prototype to avoid an error.
11253 Use char because int might match the return type of a GCC
11254 builtin and then its argument prototype would still apply. */
11255#ifdef __cplusplus
11256extern "C"
11257#endif
11258char flock ();
11259int
11260main ()
11261{
11262return flock ();
11263 ;
11264 return 0;
11265}
11266_ACEOF
11267if ac_fn_c_try_link "$LINENO"; then :
11268 ac_cv_lib_bsd_flock=yes
11269else
11270 ac_cv_lib_bsd_flock=no
11271fi
11272rm -f core conftest.err conftest.$ac_objext \
11273 conftest$ac_exeext conftest.$ac_ext
11274LIBS=$ac_check_lib_save_LIBS
11275fi
11276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11277$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011278if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011279 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011280
11281
11282$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11283
11284
11285fi
11286
11287
11288fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011289done
11290
Antoine Pitroua3000072010-09-07 14:52:42 +000011291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11294$as_echo_n "checking for getpagesize... " >&6; }
11295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011297
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011298#include <unistd.h>
11299
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011300int
11301main ()
11302{
11303void* p = getpagesize
11304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011311
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011317
11318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011320
Victor Stinner984890f2011-11-24 13:53:38 +010011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11322$as_echo_n "checking for broken unsetenv... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11324/* end confdefs.h. */
11325
11326#include <stdlib.h>
11327
11328int
11329main ()
11330{
11331int res = unsetenv("DUMMY")
11332 ;
11333 return 0;
11334}
11335_ACEOF
11336if ac_fn_c_try_compile "$LINENO"; then :
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338$as_echo "no" >&6; }
11339else
11340
11341$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11342
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11344$as_echo "yes" >&6; }
11345
11346fi
11347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11348
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011349for ac_prog in true
11350do
11351 # Extract the first word of "$ac_prog", so it can be a program name with args.
11352set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11354$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011355if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011357else
11358 if test -n "$TRUE"; then
11359 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11360else
11361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11362for as_dir in $PATH
11363do
11364 IFS=$as_save_IFS
11365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011368 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 $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 +000011370 break 2
11371 fi
11372done
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011375
11376fi
11377fi
11378TRUE=$ac_cv_prog_TRUE
11379if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11381$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011382else
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011385fi
11386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011387
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011388 test -n "$TRUE" && break
11389done
11390test -n "$TRUE" || TRUE="/bin/true"
11391
11392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11394$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011395if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011397else
11398 ac_check_lib_save_LIBS=$LIBS
11399LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011401/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403/* Override any GCC internal prototype to avoid an error.
11404 Use char because int might match the return type of a GCC
11405 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011406#ifdef __cplusplus
11407extern "C"
11408#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011409char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011410int
11411main ()
11412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011419 ac_cv_lib_c_inet_aton=yes
11420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011423rm -f core conftest.err conftest.$ac_objext \
11424 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011425LIBS=$ac_check_lib_save_LIBS
11426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11428$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011429if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011430 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11433$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011434if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011436else
11437 ac_check_lib_save_LIBS=$LIBS
11438LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442/* Override any GCC internal prototype to avoid an error.
11443 Use char because int might match the return type of a GCC
11444 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011445#ifdef __cplusplus
11446extern "C"
11447#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011448char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011449int
11450main ()
11451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011453 ;
11454 return 0;
11455}
11456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011458 ac_cv_lib_resolv_inet_aton=yes
11459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011462rm -f core conftest.err conftest.$ac_objext \
11463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011464LIBS=$ac_check_lib_save_LIBS
11465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11467$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011468if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011469 cat >>confdefs.h <<_ACEOF
11470#define HAVE_LIBRESOLV 1
11471_ACEOF
11472
11473 LIBS="-lresolv $LIBS"
11474
11475fi
11476
11477
11478fi
11479
11480
Christian Heimesd0764e22007-12-04 15:00:33 +000011481# On Tru64, chflags seems to be present, but calling it will
11482# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11484$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011485if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011487else
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011489 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011492/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011493
Christian Heimesd0764e22007-12-04 15:00:33 +000011494#include <sys/stat.h>
11495#include <unistd.h>
11496int main(int argc, char*argv[])
11497{
11498 if(chflags(argv[0], 0) != 0)
11499 return 1;
11500 return 0;
11501}
Ned Deily3eb67d52011-06-28 00:00:28 -070011502
Christian Heimesd0764e22007-12-04 15:00:33 +000011503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011505 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11510 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011511fi
11512
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11516$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011517if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011519if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011520 ac_cv_have_chflags="yes"
11521else
11522 ac_cv_have_chflags="no"
11523fi
11524
11525fi
11526if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011529
11530fi
11531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11533$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011534if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011536else
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011538 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011541/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011542
Christian Heimesd0764e22007-12-04 15:00:33 +000011543#include <sys/stat.h>
11544#include <unistd.h>
11545int main(int argc, char*argv[])
11546{
11547 if(lchflags(argv[0], 0) != 0)
11548 return 1;
11549 return 0;
11550}
Ned Deily3eb67d52011-06-28 00:00:28 -070011551
Christian Heimesd0764e22007-12-04 15:00:33 +000011552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011554 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011555else
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011560fi
11561
11562
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11565$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011566if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011568if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011569 ac_cv_have_lchflags="yes"
11570else
11571 ac_cv_have_lchflags="no"
11572fi
11573
11574fi
11575if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011578
11579fi
11580
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011581case $ac_sys_system/$ac_sys_release in
11582Darwin/*)
11583 _CUR_CFLAGS="${CFLAGS}"
11584 _CUR_LDFLAGS="${LDFLAGS}"
11585 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11586 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11587 ;;
11588esac
11589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11591$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011592if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011594else
11595 ac_check_lib_save_LIBS=$LIBS
11596LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011598/* end confdefs.h. */
11599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600/* Override any GCC internal prototype to avoid an error.
11601 Use char because int might match the return type of a GCC
11602 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011603#ifdef __cplusplus
11604extern "C"
11605#endif
11606char inflateCopy ();
11607int
11608main ()
11609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011611 ;
11612 return 0;
11613}
11614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011616 ac_cv_lib_z_inflateCopy=yes
11617else
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011620rm -f core conftest.err conftest.$ac_objext \
11621 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011622LIBS=$ac_check_lib_save_LIBS
11623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11625$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011626if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011629
11630fi
11631
11632
11633case $ac_sys_system/$ac_sys_release in
11634Darwin/*)
11635 CFLAGS="${_CUR_CFLAGS}"
11636 LDFLAGS="${_CUR_LDFLAGS}"
11637 ;;
11638esac
11639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11641$as_echo_n "checking for hstrerror... " >&6; }
11642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011643/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011644
Martin v. Löwise9416172003-05-03 10:12:45 +000011645#include <netdb.h>
11646
Martin v. Löwise9416172003-05-03 10:12:45 +000011647int
11648main ()
11649{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011650void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011651 ;
11652 return 0;
11653}
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011656
Matthias Kloseb9621712010-04-24 17:59:49 +000011657$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011658
Matthias Kloseb159a552010-04-25 21:00:44 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011660$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011661else
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11663$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011664
11665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011666rm -f core conftest.err conftest.$ac_objext \
11667 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11670$as_echo_n "checking for inet_aton... " >&6; }
11671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011672/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011673
Martin v. Löwis86d66262006-02-17 08:40:11 +000011674#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011675#include <sys/socket.h>
11676#include <netinet/in.h>
11677#include <arpa/inet.h>
11678
Martin v. Löwise9416172003-05-03 10:12:45 +000011679int
11680main ()
11681{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011682void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011683 ;
11684 return 0;
11685}
11686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011690
Matthias Kloseb159a552010-04-25 21:00:44 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011692$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11695$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011696
11697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core conftest.err conftest.$ac_objext \
11699 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11702$as_echo_n "checking for inet_pton... " >&6; }
11703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011704/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011705
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011706#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011707#include <sys/socket.h>
11708#include <netinet/in.h>
11709#include <arpa/inet.h>
11710
Martin v. Löwise9416172003-05-03 10:12:45 +000011711int
11712main ()
11713{
11714void* p = inet_pton
11715 ;
11716 return 0;
11717}
11718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011722
Matthias Kloseb159a552010-04-25 21:00:44 +000011723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011724$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011728
11729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011731
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011732# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11734$as_echo_n "checking for setgroups... " >&6; }
11735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011736/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011737
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011738#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011739#ifdef HAVE_GRP_H
11740#include <grp.h>
11741#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011742
Martin v. Löwisd5843682002-11-21 20:41:28 +000011743int
11744main ()
11745{
11746void* p = setgroups
11747 ;
11748 return 0;
11749}
11750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011754
Matthias Kloseb159a552010-04-25 21:00:44 +000011755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011756$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11759$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011760
11761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011764# check for openpty and forkpty
11765
11766for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011767do :
11768 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011772_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011773
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11776$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011777if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011779else
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011781LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011785/* Override any GCC internal prototype to avoid an error.
11786 Use char because int might match the return type of a GCC
11787 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011788#ifdef __cplusplus
11789extern "C"
11790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011791char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011792int
11793main ()
11794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 ;
11797 return 0;
11798}
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805rm -f core conftest.err conftest.$ac_objext \
11806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011807LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11810$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011811if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011813 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11816$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011819else
11820 ac_check_lib_save_LIBS=$LIBS
11821LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011823/* end confdefs.h. */
11824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825/* Override any GCC internal prototype to avoid an error.
11826 Use char because int might match the return type of a GCC
11827 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011828#ifdef __cplusplus
11829extern "C"
11830#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011831char openpty ();
11832int
11833main ()
11834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011841 ac_cv_lib_bsd_openpty=yes
11842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011847LIBS=$ac_check_lib_save_LIBS
11848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11850$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011853 LIBS="$LIBS -lbsd"
11854fi
11855
11856
11857fi
11858
Fred Drake8cef4cf2000-06-28 16:40:38 +000011859
11860fi
11861done
11862
11863for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011864do :
11865 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011866if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011869_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011870
Fred Drake8cef4cf2000-06-28 16:40:38 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11873$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011876else
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011878LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882/* Override any GCC internal prototype to avoid an error.
11883 Use char because int might match the return type of a GCC
11884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011885#ifdef __cplusplus
11886extern "C"
11887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011888char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011889int
11890main ()
11891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 ;
11894 return 0;
11895}
11896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011897if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011898 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011904LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11907$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011910 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11913$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011914if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011916else
11917 ac_check_lib_save_LIBS=$LIBS
11918LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011920/* end confdefs.h. */
11921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011922/* Override any GCC internal prototype to avoid an error.
11923 Use char because int might match the return type of a GCC
11924 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011925#ifdef __cplusplus
11926extern "C"
11927#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011928char forkpty ();
11929int
11930main ()
11931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011933 ;
11934 return 0;
11935}
11936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011938 ac_cv_lib_bsd_forkpty=yes
11939else
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011942rm -f core conftest.err conftest.$ac_objext \
11943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011944LIBS=$ac_check_lib_save_LIBS
11945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11947$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011950 LIBS="$LIBS -lbsd"
11951fi
11952
11953
11954fi
11955
Fred Drake8cef4cf2000-06-28 16:40:38 +000011956
11957fi
11958done
11959
Jack Jansendd19cf82001-12-06 22:36:17 +000011960
Christian Heimesb186d002008-03-18 15:15:01 +000011961# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011962for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011963do :
11964 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011965if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011966 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011967#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011968_ACEOF
11969
11970fi
11971done
11972
11973
Michael W. Hudson54241132001-12-07 15:38:26 +000011974# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011975for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011976do :
11977 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11978ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011979if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011981#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011982_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011983
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985done
11986
Michael W. Hudson54241132001-12-07 15:38:26 +000011987
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011988ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011989if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011990 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011991
Martin v. Löwis1142de32002-03-29 16:28:31 +000011992else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011993 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011994 *" dup2.$ac_objext "* ) ;;
11995 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011997esac
11998
Martin v. Löwis1142de32002-03-29 16:28:31 +000011999fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012000
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012001ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012003 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12004
12005else
12006 case " $LIBOBJS " in
12007 *" strdup.$ac_objext "* ) ;;
12008 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12009 ;;
12010esac
12011
12012fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012013
12014
12015for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012016do :
12017 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012018if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012036
Guido van Rossum627b2d71993-12-24 10:39:16 +000012037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012039
Guido van Rossum627b2d71993-12-24 10:39:16 +000012040fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012041done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012042
Jack Jansen150753c2003-03-29 22:07:47 +000012043for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012044do :
12045 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012047 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012051/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012052#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012053int
12054main ()
12055{
12056setpgrp(0,0);
12057 ;
12058 return 0;
12059}
12060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012061if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012062
Matthias Kloseb9621712010-04-24 17:59:49 +000012063$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012064
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012067
12068fi
12069done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012070
Thomas Wouters3a584202000-08-05 23:28:51 +000012071for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012072do :
12073 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012074if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012081int
12082main ()
12083{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012089if ac_fn_c_try_compile "$LINENO"; then :
12090
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091else
Skip Montanaro6dead952003-09-25 14:50:04 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Guido van Rossum627b2d71993-12-24 10:39:16 +000012096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012098
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012099fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012100done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012101
Michael W. Hudson54241132001-12-07 15:38:26 +000012102
Victor Stinnere0be4232011-10-25 13:06:09 +020012103for ac_func in clock_gettime
12104do :
12105 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12106if test "x$ac_cv_func_clock_gettime" = xyes; then :
12107 cat >>confdefs.h <<_ACEOF
12108#define HAVE_CLOCK_GETTIME 1
12109_ACEOF
12110
12111else
12112
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12114$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12115if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12116 $as_echo_n "(cached) " >&6
12117else
12118 ac_check_lib_save_LIBS=$LIBS
12119LIBS="-lrt $LIBS"
12120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12121/* end confdefs.h. */
12122
12123/* Override any GCC internal prototype to avoid an error.
12124 Use char because int might match the return type of a GCC
12125 builtin and then its argument prototype would still apply. */
12126#ifdef __cplusplus
12127extern "C"
12128#endif
12129char clock_gettime ();
12130int
12131main ()
12132{
12133return clock_gettime ();
12134 ;
12135 return 0;
12136}
12137_ACEOF
12138if ac_fn_c_try_link "$LINENO"; then :
12139 ac_cv_lib_rt_clock_gettime=yes
12140else
12141 ac_cv_lib_rt_clock_gettime=no
12142fi
12143rm -f core conftest.err conftest.$ac_objext \
12144 conftest$ac_exeext conftest.$ac_ext
12145LIBS=$ac_check_lib_save_LIBS
12146fi
12147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12148$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12149if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12150
Victor Stinner7efb8332014-08-29 15:41:08 +020012151 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012152 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12153
12154
12155$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12156
12157
12158fi
12159
12160
12161fi
12162done
12163
12164
12165for ac_func in clock_getres
12166do :
12167 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12168if test "x$ac_cv_func_clock_getres" = xyes; then :
12169 cat >>confdefs.h <<_ACEOF
12170#define HAVE_CLOCK_GETRES 1
12171_ACEOF
12172
12173else
12174
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12176$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12177if ${ac_cv_lib_rt_clock_getres+:} false; then :
12178 $as_echo_n "(cached) " >&6
12179else
12180 ac_check_lib_save_LIBS=$LIBS
12181LIBS="-lrt $LIBS"
12182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12183/* end confdefs.h. */
12184
12185/* Override any GCC internal prototype to avoid an error.
12186 Use char because int might match the return type of a GCC
12187 builtin and then its argument prototype would still apply. */
12188#ifdef __cplusplus
12189extern "C"
12190#endif
12191char clock_getres ();
12192int
12193main ()
12194{
12195return clock_getres ();
12196 ;
12197 return 0;
12198}
12199_ACEOF
12200if ac_fn_c_try_link "$LINENO"; then :
12201 ac_cv_lib_rt_clock_getres=yes
12202else
12203 ac_cv_lib_rt_clock_getres=no
12204fi
12205rm -f core conftest.err conftest.$ac_objext \
12206 conftest$ac_exeext conftest.$ac_ext
12207LIBS=$ac_check_lib_save_LIBS
12208fi
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12210$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12211if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12212
12213 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12214
12215
12216fi
12217
12218
12219fi
12220done
12221
12222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12224$as_echo_n "checking for major... " >&6; }
12225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012226/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012227
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012228#if defined(MAJOR_IN_MKDEV)
12229#include <sys/mkdev.h>
12230#elif defined(MAJOR_IN_SYSMACROS)
12231#include <sys/sysmacros.h>
12232#else
12233#include <sys/types.h>
12234#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012235
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012236int
12237main ()
12238{
12239
12240 makedev(major(0),minor(0));
12241
12242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012247
12248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12252$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012253
12254else
Skip Montanaro6dead952003-09-25 14:50:04 +000012255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12257$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012258
12259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012260rm -f core conftest.err conftest.$ac_objext \
12261 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012262
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012263# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012264# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12266$as_echo_n "checking for getaddrinfo... " >&6; }
12267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012269
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012270#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012271#include <sys/socket.h>
12272#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012273#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275int
12276main ()
12277{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012278getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012284 have_getaddrinfo=yes
12285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012288rm -f core conftest.err conftest.$ac_objext \
12289 conftest$ac_exeext conftest.$ac_ext
12290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12291$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012292if test $have_getaddrinfo = yes
12293then
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12295$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012296 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012300
12301if test "${enable_ipv6+set}" = set; then
12302 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12303else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012304 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012305fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306else
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012309
Stefan Krah19c21392012-11-22 23:47:32 +010012310#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311#include <sys/types.h>
12312#include <netdb.h>
12313#include <string.h>
12314#include <sys/socket.h>
12315#include <netinet/in.h>
12316
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012317int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318{
12319 int passive, gaierr, inet4 = 0, inet6 = 0;
12320 struct addrinfo hints, *ai, *aitop;
12321 char straddr[INET6_ADDRSTRLEN], strport[16];
12322
12323 for (passive = 0; passive <= 1; passive++) {
12324 memset(&hints, 0, sizeof(hints));
12325 hints.ai_family = AF_UNSPEC;
12326 hints.ai_flags = passive ? AI_PASSIVE : 0;
12327 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012328 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012329 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12330 (void)gai_strerror(gaierr);
12331 goto bad;
12332 }
12333 for (ai = aitop; ai; ai = ai->ai_next) {
12334 if (ai->ai_addr == NULL ||
12335 ai->ai_addrlen == 0 ||
12336 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12337 straddr, sizeof(straddr), strport, sizeof(strport),
12338 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12339 goto bad;
12340 }
12341 switch (ai->ai_family) {
12342 case AF_INET:
12343 if (strcmp(strport, "54321") != 0) {
12344 goto bad;
12345 }
12346 if (passive) {
12347 if (strcmp(straddr, "0.0.0.0") != 0) {
12348 goto bad;
12349 }
12350 } else {
12351 if (strcmp(straddr, "127.0.0.1") != 0) {
12352 goto bad;
12353 }
12354 }
12355 inet4++;
12356 break;
12357 case AF_INET6:
12358 if (strcmp(strport, "54321") != 0) {
12359 goto bad;
12360 }
12361 if (passive) {
12362 if (strcmp(straddr, "::") != 0) {
12363 goto bad;
12364 }
12365 } else {
12366 if (strcmp(straddr, "::1") != 0) {
12367 goto bad;
12368 }
12369 }
12370 inet6++;
12371 break;
12372 case AF_UNSPEC:
12373 goto bad;
12374 break;
12375 default:
12376 /* another family support? */
12377 break;
12378 }
12379 }
12380 }
12381
12382 if (!(inet4 == 0 || inet4 == 2))
12383 goto bad;
12384 if (!(inet6 == 0 || inet6 == 2))
12385 goto bad;
12386
12387 if (aitop)
12388 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012389 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390
12391 bad:
12392 if (aitop)
12393 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012394 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012395}
12396
Martin v. Löwis11437992002-04-12 09:54:03 +000012397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012399 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012400else
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012407fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012408
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12412$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12413
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012414if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012415then
12416 if test $ipv6 = yes
12417 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012418 echo 'Fatal: You must get working getaddrinfo() function.'
12419 echo ' or you can specify "--disable-ipv6"'.
12420 exit 1
12421 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012422else
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012425
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012427
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012428for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012429do :
12430 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012431if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012434_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012435
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012436fi
12437done
12438
Michael W. Hudson54241132001-12-07 15:38:26 +000012439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12442$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012443if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445else
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012448#include <sys/types.h>
12449#include <sys/time.h>
12450#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
12455if ((struct tm *) 0)
12456return 0;
12457 ;
12458 return 0;
12459}
12460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012461if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012463else
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12469$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012470if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473
12474fi
12475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12477$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012478if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480else
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483#include <sys/types.h>
12484#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486int
12487main ()
12488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489struct tm tm;
12490 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 ;
12493 return 0;
12494}
12495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012496if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497 ac_cv_struct_tm=time.h
12498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12504$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012505if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Matthias Kloseb9621712010-04-24 17:59:49 +000012507$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508
12509fi
12510
Matthias Kloseb9621712010-04-24 17:59:49 +000012511ac_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 +000012512#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Matthias Kloseb9621712010-04-24 17:59:49 +000012514"
Victor Stinnere0be4232011-10-25 13:06:09 +020012515if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
12517cat >>confdefs.h <<_ACEOF
12518#define HAVE_STRUCT_TM_TM_ZONE 1
12519_ACEOF
12520
12521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012523
Martin v. Löwis11437992002-04-12 09:54:03 +000012524if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012527
12528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12530"
Victor Stinnere0be4232011-10-25 13:06:09 +020012531if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535fi
12536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012537cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539_ACEOF
12540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12542$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012543if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545else
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012548#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549#if !HAVE_DECL_TZNAME
12550extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553int
12554main ()
12555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ;
12558 return 0;
12559}
12560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012561if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562 ac_cv_var_tzname=yes
12563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012566rm -f core conftest.err conftest.$ac_objext \
12567 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12570$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012571 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012575 fi
12576fi
12577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578ac_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 +020012579if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012580
12581cat >>confdefs.h <<_ACEOF
12582#define HAVE_STRUCT_STAT_ST_RDEV 1
12583_ACEOF
12584
12585
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012586fi
12587
Matthias Kloseb9621712010-04-24 17:59:49 +000012588ac_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 +020012589if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012590
Martin v. Löwis11437992002-04-12 09:54:03 +000012591cat >>confdefs.h <<_ACEOF
12592#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12593_ACEOF
12594
12595
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012596fi
12597
Matthias Kloseb9621712010-04-24 17:59:49 +000012598ac_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 +020012599if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012600
12601cat >>confdefs.h <<_ACEOF
12602#define HAVE_STRUCT_STAT_ST_FLAGS 1
12603_ACEOF
12604
12605
12606fi
12607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608ac_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 +020012609if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012610
12611cat >>confdefs.h <<_ACEOF
12612#define HAVE_STRUCT_STAT_ST_GEN 1
12613_ACEOF
12614
12615
12616fi
12617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618ac_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 +020012619if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012620
12621cat >>confdefs.h <<_ACEOF
12622#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12623_ACEOF
12624
12625
12626fi
12627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628ac_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 +020012629if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012630
Martin v. Löwis11437992002-04-12 09:54:03 +000012631cat >>confdefs.h <<_ACEOF
12632#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12633_ACEOF
12634
12635
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012636fi
12637
Stefan Krah267b6392016-04-26 01:09:18 +020012638ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12639 #include <sys/types.h>
12640 #include <pwd.h>
12641
12642"
12643if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12644
12645cat >>confdefs.h <<_ACEOF
12646#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12647_ACEOF
12648
12649
12650fi
12651ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12652 #include <sys/types.h>
12653 #include <pwd.h>
12654
12655"
12656if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12657
12658cat >>confdefs.h <<_ACEOF
12659#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12660_ACEOF
12661
12662
12663fi
12664
Michael W. Hudson54241132001-12-07 15:38:26 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12667$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012668if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670else
Matthias Kloseb159a552010-04-25 21:00:44 +000012671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012673/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012674#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012675int
12676main ()
12677{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012678return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 ;
12680 return 0;
12681}
12682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684 ac_cv_header_time_altzone=yes
12685else
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690fi
12691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12693$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697
12698fi
12699
Guido van Rossumda88dad1995-01-26 00:46:29 +000012700was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12702$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012705
12706#include <sys/types.h>
12707#include <sys/select.h>
12708#include <sys/time.h>
12709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710int
12711main ()
12712{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012713;
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
12720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012723 was_it_defined=yes
12724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12728$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12731$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012732if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012737#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012738int
12739main ()
12740{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ;
12743 return 0;
12744}
12745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012747 ac_cv_struct_addrinfo=yes
12748else
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12752fi
12753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12755$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012756if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759
12760fi
12761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12763$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012764if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012766else
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012768/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012769
12770# include <sys/types.h>
12771# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012772int
12773main ()
12774{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ;
12777 return 0;
12778}
12779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012781 ac_cv_struct_sockaddr_storage=yes
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12786fi
12787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12789$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012790if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
Matthias Kloseb9621712010-04-24 17:59:49 +000012792$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793
12794fi
12795
Christian Heimesdffa3942016-09-05 23:54:41 +020012796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12797$as_echo_n "checking for sockaddr_alg... " >&6; }
12798if ${ac_cv_struct_sockaddr_alg+:} false; then :
12799 $as_echo_n "(cached) " >&6
12800else
12801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802/* end confdefs.h. */
12803
12804# include <sys/types.h>
12805# include <sys/socket.h>
12806# include <linux/if_alg.h>
12807int
12808main ()
12809{
12810struct sockaddr_alg s
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815if ac_fn_c_try_compile "$LINENO"; then :
12816 ac_cv_struct_sockaddr_alg=yes
12817else
12818 ac_cv_struct_sockaddr_alg=no
12819fi
12820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12821fi
12822
12823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12824$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12825if test $ac_cv_struct_sockaddr_alg = yes; then
12826
12827$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12828
12829fi
12830
Guido van Rossum627b2d71993-12-24 10:39:16 +000012831# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12834$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012835if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012840$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012841int
12842main ()
12843{
12844static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012845test_array [0] = 0;
12846return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
12848 ;
12849 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012850}
Martin v. Löwis11437992002-04-12 09:54:03 +000012851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012852if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012853 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012854else
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12860$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012863
12864fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12867$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012868if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012870else
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874int
12875main ()
12876{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012877
Martin v. Löwis11437992002-04-12 09:54:03 +000012878#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012879 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012881 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883 char const *const *pcpcc;
12884 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 /* NEC SVR4.0.2 mips cc rejects this. */
12886 struct point {int x, y;};
12887 static struct point const zero = {0,0};
12888 /* AIX XL C 1.02.0.0 rejects this.
12889 It does not let you subtract one const X* pointer from another in
12890 an arm of an if-expression whose if-part is not a constant
12891 expression */
12892 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895 ++pcpcc;
12896 ppc = (char**) pcpcc;
12897 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012898 { /* SCO 3.2v4 cc rejects this sort of thing. */
12899 char tx;
12900 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 }
12906 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12907 int x[] = {25, 17};
12908 const int *foo = &x[0];
12909 ++foo;
12910 }
12911 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12912 typedef const int *iptr;
12913 iptr p = 0;
12914 ++p;
12915 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012916 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012918 struct s { int j; const int *ap[3]; } bx;
12919 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 }
12921 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12922 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012927
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ;
12929 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012930}
Martin v. Löwis11437992002-04-12 09:54:03 +000012931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012932if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933 ac_cv_c_const=yes
12934else
Matthias Kloseb9621712010-04-24 17:59:49 +000012935 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12940$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944
12945fi
12946
Michael W. Hudson54241132001-12-07 15:38:26 +000012947
Guido van Rossumda88dad1995-01-26 00:46:29 +000012948works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12950$as_echo_n "checking for working volatile... " >&6; }
12951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012952/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954int
12955main ()
12956{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 ;
12959 return 0;
12960}
12961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012962if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012963 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012964else
Skip Montanaro6dead952003-09-25 14:50:04 +000012965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012967
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012968
Guido van Rossum627b2d71993-12-24 10:39:16 +000012969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12972$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012973
Guido van Rossumda88dad1995-01-26 00:46:29 +000012974works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12976$as_echo_n "checking for working signed char... " >&6; }
12977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012979
Martin v. Löwis11437992002-04-12 09:54:03 +000012980int
12981main ()
12982{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ;
12985 return 0;
12986}
12987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012989 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012990else
Skip Montanaro6dead952003-09-25 14:50:04 +000012991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012993
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012994
Guido van Rossum7f43da71994-08-01 12:15:30 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12998$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012999
Guido van Rossumda88dad1995-01-26 00:46:29 +000013000have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13002$as_echo_n "checking for prototypes... " >&6; }
13003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013005int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013006int
13007main ()
13008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ;
13011 return 0;
13012}
13013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Matthias Kloseb159a552010-04-25 21:00:44 +000013018 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13022$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023
Guido van Rossumda88dad1995-01-26 00:46:29 +000013024works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13026$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013029
13030#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013031int foo(int x, ...) {
13032 va_list va;
13033 va_start(va, x);
13034 va_arg(va, int);
13035 va_arg(va, char *);
13036 va_arg(va, double);
13037 return 0;
13038}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013039
Martin v. Löwis11437992002-04-12 09:54:03 +000013040int
13041main ()
13042{
Guido van Rossum90eea071996-08-30 20:58:57 +000013043return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 ;
13045 return 0;
13046}
13047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013049
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013052
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013053 works=yes
13054
Guido van Rossum627b2d71993-12-24 10:39:16 +000013055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13058$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059
Martin v. Löwisd6320502004-08-12 13:45:08 +000013060# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13062$as_echo_n "checking for socketpair... " >&6; }
13063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013064/* end confdefs.h. */
13065
13066#include <sys/types.h>
13067#include <sys/socket.h>
13068
13069int
13070main ()
13071{
13072void *x=socketpair
13073 ;
13074 return 0;
13075}
13076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013077if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013080
Matthias Kloseb159a552010-04-25 21:00:44 +000013081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013082$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13085$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013086
13087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013089
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013090# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13092$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095#include <sys/types.h>
13096#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013097int
13098main ()
13099{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013100struct sockaddr x;
13101x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ;
13103 return 0;
13104}
13105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013106if ac_fn_c_try_compile "$LINENO"; then :
13107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13108$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111
13112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13114$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013115
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013118
Guido van Rossumda88dad1995-01-26 00:46:29 +000013119va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13121$as_echo_n "checking whether va_list is an array... " >&6; }
13122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013123/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124
13125#ifdef HAVE_STDARG_PROTOTYPES
13126#include <stdarg.h>
13127#else
13128#include <varargs.h>
13129#endif
13130
Martin v. Löwis11437992002-04-12 09:54:03 +000013131int
13132main ()
13133{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 ;
13136 return 0;
13137}
13138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013139if ac_fn_c_try_compile "$LINENO"; then :
13140
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013141else
Skip Montanaro6dead952003-09-25 14:50:04 +000013142
Martin v. Löwis11437992002-04-12 09:54:03 +000013143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
Guido van Rossumda88dad1995-01-26 00:46:29 +000013146 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013147
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13151$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013152
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013153# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
13155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013157if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13162$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013163 OLD_CFLAGS=$CFLAGS
13164 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013166/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013167
13168# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Martin v. Löwis11437992002-04-12 09:54:03 +000013170int
13171main ()
13172{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013173
13174 char *name;
13175 struct hostent *he, *res;
13176 char buffer[2048];
13177 int buflen = 2048;
13178 int h_errnop;
13179
13180 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013181
13182 ;
13183 return 0;
13184}
13185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013189
Martin v. Löwis11437992002-04-12 09:54:03 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13194$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013195
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013196else
Skip Montanaro6dead952003-09-25 14:50:04 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13199$as_echo "no" >&6; }
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13201$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013204
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013205# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013206
Martin v. Löwis11437992002-04-12 09:54:03 +000013207int
13208main ()
13209{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013210
13211 char *name;
13212 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013213 char buffer[2048];
13214 int buflen = 2048;
13215 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013216
Matthias Kloseb159a552010-04-25 21:00:44 +000013217 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
13219 ;
13220 return 0;
13221}
13222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013226
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
Matthias Kloseb159a552010-04-25 21:00:44 +000013228$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13231$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013233else
Skip Montanaro6dead952003-09-25 14:50:04 +000013234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13236$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13238$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13240/* end confdefs.h. */
13241
13242# include <netdb.h>
13243
13244int
13245main ()
13246{
13247
13248 char *name;
13249 struct hostent *he;
13250 struct hostent_data data;
13251
13252 (void) gethostbyname_r(name, he, &data);
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258if ac_fn_c_try_compile "$LINENO"; then :
13259
13260 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13261
13262
13263$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13264
13265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13266$as_echo "yes" >&6; }
13267
13268else
13269
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13271$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013281 CFLAGS=$OLD_CFLAGS
13282
13283else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 for ac_func in gethostbyname
13286do :
13287 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013288if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013290#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013291_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013292
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013293fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013294done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013295
Michael W. Hudson54241132001-12-07 15:38:26 +000013296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013297fi
13298
Michael W. Hudson54241132001-12-07 15:38:26 +000013299
13300
13301
13302
13303
13304
Guido van Rossum627b2d71993-12-24 10:39:16 +000013305# checks for system services
13306# (none yet)
13307
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013309ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013310if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013311
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013312else
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13314$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013315if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317else
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013319LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323/* Override any GCC internal prototype to avoid an error.
13324 Use char because int might match the return type of a GCC
13325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013326#ifdef __cplusplus
13327extern "C"
13328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013329char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013330int
13331main ()
13332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 ;
13335 return 0;
13336}
13337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013343rm -f core conftest.err conftest.$ac_objext \
13344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013345LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13348$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013349if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 cat >>confdefs.h <<_ACEOF
13351#define HAVE_LIBIEEE 1
13352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013354 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355
Guido van Rossum627b2d71993-12-24 10:39:16 +000013356fi
13357
Michael W. Hudson54241132001-12-07 15:38:26 +000013358
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013359fi
13360
Michael W. Hudson54241132001-12-07 15:38:26 +000013361
Guido van Rossum7f253911997-05-09 02:42:48 +000013362# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13364$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013367if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013369if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013370then
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13375$as_echo "yes" >&6; }
13376else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13377$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013378fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382fi
13383
Guido van Rossum7f253911997-05-09 02:42:48 +000013384
Guido van Rossum7f43da71994-08-01 12:15:30 +000013385# check for --with-libm=...
13386
Guido van Rossum563e7081996-09-10 18:20:48 +000013387case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013388Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013389*) LIBM=-lm
13390esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13392$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013395if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013397if test "$withval" = no
13398then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13400$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013401elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013402then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13404$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013405else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013406fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13409$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410fi
13411
Guido van Rossum7f43da71994-08-01 12:15:30 +000013412
13413# check for --with-libc=...
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13416$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013421if test "$withval" = no
13422then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13424$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013425elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13428$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013429else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13433$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434fi
13435
Guido van Rossum7f43da71994-08-01 12:15:30 +000013436
Stefan Krah1919b7e2012-03-21 18:25:23 +010013437# **************************************
13438# * Check for gcc x64 inline assembler *
13439# **************************************
13440
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13442$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h. */
13445
13446int
13447main ()
13448{
13449
13450 __asm__ __volatile__ ("movq %rcx, %rax");
13451
13452 ;
13453 return 0;
13454}
13455_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013456if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013457 have_gcc_asm_for_x64=yes
13458else
13459 have_gcc_asm_for_x64=no
13460fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013461rm -f core conftest.err conftest.$ac_objext \
13462 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13464$as_echo "$have_gcc_asm_for_x64" >&6; }
13465if test "$have_gcc_asm_for_x64" = yes
13466then
13467
13468$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13469
13470fi
13471
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013472# **************************************************
13473# * Check for various properties of floating point *
13474# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13477$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013478if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013480else
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013483 ac_cv_little_endian_double=no
13484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013486/* end confdefs.h. */
13487
13488#include <string.h>
13489int main() {
13490 double x = 9006104071832581.0;
13491 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13492 return 0;
13493 else
13494 return 1;
13495}
13496
13497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013499 ac_cv_little_endian_double=yes
13500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13504 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013505fi
13506
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013507fi
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13510$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013511if test "$ac_cv_little_endian_double" = yes
13512then
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013515
13516fi
13517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13519$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013520if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013522else
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013525 ac_cv_big_endian_double=no
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013528/* end confdefs.h. */
13529
13530#include <string.h>
13531int main() {
13532 double x = 9006104071832581.0;
13533 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13534 return 0;
13535 else
13536 return 1;
13537}
13538
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013541 ac_cv_big_endian_double=yes
13542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013547fi
13548
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013549fi
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13552$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013553if test "$ac_cv_big_endian_double" = yes
13554then
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013557
13558fi
13559
13560# Some ARM platforms use a mixed-endian representation for doubles.
13561# While Python doesn't currently have full support for these platforms
13562# (see e.g., issue 1762561), we can at least make sure that float <-> string
13563# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13565$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013566if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013568else
13569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013571 ac_cv_mixed_endian_double=no
13572else
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013574/* end confdefs.h. */
13575
13576#include <string.h>
13577int main() {
13578 double x = 9006104071832581.0;
13579 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13580 return 0;
13581 else
13582 return 1;
13583}
13584
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013587 ac_cv_mixed_endian_double=yes
13588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013593fi
13594
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013595fi
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13598$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013599if test "$ac_cv_mixed_endian_double" = yes
13600then
13601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013603
13604fi
13605
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013606# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013607# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013608# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013609# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013610# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013611# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013612
13613# This inline assembler syntax may also work for suncc and icc,
13614# so we try it on all platforms.
13615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13617$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013619/* end confdefs.h. */
13620
13621int
13622main ()
13623{
13624
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013625 unsigned short cw;
13626 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13627 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013628
13629 ;
13630 return 0;
13631}
13632_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013633if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013634 have_gcc_asm_for_x87=yes
13635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013637fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013638rm -f core conftest.err conftest.$ac_objext \
13639 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13641$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013642if test "$have_gcc_asm_for_x87" = yes
13643then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013646
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13650$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653
13654int
13655main ()
13656{
13657
13658 unsigned int fpcr;
13659 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13660 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13661
13662 ;
13663 return 0;
13664}
13665_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013666if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013667 have_gcc_asm_for_mc68881=yes
13668else
13669 have_gcc_asm_for_mc68881=no
13670fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013671rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13674$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13675if test "$have_gcc_asm_for_mc68881" = yes
13676then
13677
13678$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13679
13680fi
13681
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013682# Detect whether system arithmetic is subject to x87-style double
13683# rounding issues. The result of this test has little meaning on non
13684# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13685# mode is round-to-nearest and double rounding issues are present, and
13686# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13688$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013689# $BASECFLAGS may affect the result
13690ac_save_cc="$CC"
13691CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013693 ac_cv_x87_double_rounding=no
13694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013696/* end confdefs.h. */
13697
13698#include <stdlib.h>
13699#include <math.h>
13700int main() {
13701 volatile double x, y, z;
13702 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13703 x = 0.99999999999999989; /* 1-2**-53 */
13704 y = 1./x;
13705 if (y != 1.)
13706 exit(0);
13707 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13708 x = 1e16;
13709 y = 2.99999;
13710 z = x + y;
13711 if (z != 1e16+4.)
13712 exit(0);
13713 /* both tests show evidence of double rounding */
13714 exit(1);
13715}
13716
13717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013719 ac_cv_x87_double_rounding=no
13720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013725fi
13726
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013727CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13729$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013730if test "$ac_cv_x87_double_rounding" = yes
13731then
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013734
13735fi
13736
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737# ************************************
13738# * Check for mathematical functions *
13739# ************************************
13740
13741LIBS_SAVE=$LIBS
13742LIBS="$LIBS $LIBM"
13743
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013744for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13745do :
13746 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13747ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013748if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013749 cat >>confdefs.h <<_ACEOF
13750#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13751_ACEOF
13752
13753fi
13754done
13755
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013756for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013757do :
13758 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13759ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013760if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013761 cat >>confdefs.h <<_ACEOF
13762#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13763_ACEOF
13764
13765fi
13766done
13767
13768ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13769"
Victor Stinnere0be4232011-10-25 13:06:09 +020013770if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013771 ac_have_decl=1
13772else
13773 ac_have_decl=0
13774fi
13775
13776cat >>confdefs.h <<_ACEOF
13777#define HAVE_DECL_ISINF $ac_have_decl
13778_ACEOF
13779ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13780"
Victor Stinnere0be4232011-10-25 13:06:09 +020013781if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013782 ac_have_decl=1
13783else
13784 ac_have_decl=0
13785fi
13786
13787cat >>confdefs.h <<_ACEOF
13788#define HAVE_DECL_ISNAN $ac_have_decl
13789_ACEOF
13790ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13791"
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013793 ac_have_decl=1
13794else
13795 ac_have_decl=0
13796fi
13797
13798cat >>confdefs.h <<_ACEOF
13799#define HAVE_DECL_ISFINITE $ac_have_decl
13800_ACEOF
13801
13802
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013803# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13804# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13806$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013809else
13810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013812 ac_cv_tanh_preserves_zero_sign=no
13813else
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013815/* end confdefs.h. */
13816
13817#include <math.h>
13818#include <stdlib.h>
13819int main() {
13820 /* return 0 if either negative zeros don't exist
13821 on this platform or if negative zeros exist
13822 and tanh(-0.) == -0. */
13823 if (atan2(0., -1.) == atan2(-0., -1.) ||
13824 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13825 else exit(1);
13826}
13827
13828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013829if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013830 ac_cv_tanh_preserves_zero_sign=yes
13831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013836fi
13837
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013838fi
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13841$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013842if test "$ac_cv_tanh_preserves_zero_sign" = yes
13843then
13844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013846
13847fi
13848
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013849if test "$ac_cv_func_log1p" = yes
13850then
13851 # On some versions of AIX, log1p(-0.) returns 0. instead of
13852 # -0. See issue #9920.
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13854$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013855 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013856 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013857else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013858
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013859 if test "$cross_compiling" = yes; then :
13860 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013861else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13863/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013864
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013865 #include <math.h>
13866 #include <stdlib.h>
13867 int main() {
13868 /* Fail if the signs of log1p(-0.) and -0. can be
13869 distinguished. */
13870 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13871 return 0;
13872 else
13873 return 1;
13874 }
13875
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013876_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013877if ac_fn_c_try_run "$LINENO"; then :
13878 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013879else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013880 ac_cv_log1p_drops_zero_sign=yes
13881fi
13882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013884fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013885
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013886fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013887
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13889$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13890fi
13891if test "$ac_cv_log1p_drops_zero_sign" = yes
13892then
13893
13894$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13895
13896fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013897
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013898LIBS=$LIBS_SAVE
13899
Mark Dickinsona614f042009-11-28 12:48:43 +000013900# For multiprocessing module, check that sem_open
13901# actually works. For FreeBSD versions <= 7.2,
13902# the kernel module that provides POSIX semaphores
13903# isn't loaded by default, so an attempt to call
13904# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13906$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013907if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013909else
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013911 ac_cv_posix_semaphores_enabled=yes
13912else
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013914/* end confdefs.h. */
13915
13916#include <unistd.h>
13917#include <fcntl.h>
13918#include <stdio.h>
13919#include <semaphore.h>
13920#include <sys/stat.h>
13921
13922int main(void) {
13923 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13924 if (a == SEM_FAILED) {
13925 perror("sem_open");
13926 return 1;
13927 }
13928 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013929 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013930 return 0;
13931}
13932
13933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013934if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013935 ac_cv_posix_semaphores_enabled=yes
13936else
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013941fi
13942
13943
Mark Dickinsona614f042009-11-28 12:48:43 +000013944fi
13945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13947$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013948if test $ac_cv_posix_semaphores_enabled = no
13949then
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013952
13953fi
13954
Mark Dickinson10683072009-04-18 21:18:19 +000013955# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13957$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013960else
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013962 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013963else
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013965/* end confdefs.h. */
13966
13967#include <unistd.h>
13968#include <fcntl.h>
13969#include <stdio.h>
13970#include <semaphore.h>
13971#include <sys/stat.h>
13972
13973int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013974 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013975 int count;
13976 int res;
13977 if(a==SEM_FAILED){
13978 perror("sem_open");
13979 return 1;
13980
13981 }
13982 res = sem_getvalue(a, &count);
13983 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013984 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013985 return res==-1 ? 1 : 0;
13986}
13987
Mark Dickinson10683072009-04-18 21:18:19 +000013988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013989if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013990 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013991else
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013996fi
13997
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013999fi
14000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14002$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014003if test $ac_cv_broken_sem_getvalue = yes
14004then
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014007
14008fi
14009
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014010ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14011"
14012if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14013 ac_have_decl=1
14014else
14015 ac_have_decl=0
14016fi
14017
14018cat >>confdefs.h <<_ACEOF
14019#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14020_ACEOF
14021ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14022"
14023if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14024 ac_have_decl=1
14025else
14026 ac_have_decl=0
14027fi
14028
14029cat >>confdefs.h <<_ACEOF
14030#define HAVE_DECL_RTLD_NOW $ac_have_decl
14031_ACEOF
14032ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14033"
14034if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14035 ac_have_decl=1
14036else
14037 ac_have_decl=0
14038fi
14039
14040cat >>confdefs.h <<_ACEOF
14041#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14042_ACEOF
14043ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14044"
14045if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14046 ac_have_decl=1
14047else
14048 ac_have_decl=0
14049fi
14050
14051cat >>confdefs.h <<_ACEOF
14052#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14053_ACEOF
14054ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14055"
14056if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14057 ac_have_decl=1
14058else
14059 ac_have_decl=0
14060fi
14061
14062cat >>confdefs.h <<_ACEOF
14063#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14064_ACEOF
14065ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14066"
14067if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14068 ac_have_decl=1
14069else
14070 ac_have_decl=0
14071fi
14072
14073cat >>confdefs.h <<_ACEOF
14074#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14075_ACEOF
14076ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14077"
14078if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14079 ac_have_decl=1
14080else
14081 ac_have_decl=0
14082fi
14083
14084cat >>confdefs.h <<_ACEOF
14085#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14086_ACEOF
14087
14088
Mark Dickinsonbd792642009-03-18 20:06:12 +000014089# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14091$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014092# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014093if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014094 enableval=$enable_big_digits; case $enable_big_digits in
14095yes)
14096 enable_big_digits=30 ;;
14097no)
14098 enable_big_digits=15 ;;
1409915|30)
14100 ;;
14101*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014102 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 +000014103esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14105$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014106
14107cat >>confdefs.h <<_ACEOF
14108#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14109_ACEOF
14110
14111
14112else
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14114$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014115fi
14116
14117
Guido van Rossumef2255b2000-03-10 22:30:29 +000014118# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014119ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014120if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014121
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014124
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014125 wchar_h="yes"
14126
Guido van Rossumef2255b2000-03-10 22:30:29 +000014127else
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014129
14130fi
14131
Michael W. Hudson54241132001-12-07 15:38:26 +000014132
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014134# determine wchar_t size
14135if test "$wchar_h" = yes
14136then
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14139# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14140# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14142$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014143if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14147"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Martin v. Löwis11437992002-04-12 09:54:03 +000014149else
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 if test "$ac_cv_type_wchar_t" = yes; then
14151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014153as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014154See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155 else
14156 ac_cv_sizeof_wchar_t=0
14157 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014159
Martin v. Löwis11437992002-04-12 09:54:03 +000014160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14162$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163
14164
14165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014167#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014168_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014169
Michael W. Hudson54241132001-12-07 15:38:26 +000014170
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014171fi
14172
Matthias Kloseb9621712010-04-24 17:59:49 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14174$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014175have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014177/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014178
14179#include <tcl.h>
14180#if TCL_UTF_MAX != 6
14181# error "NOT UCS4_TCL"
14182#endif
14183int
14184main ()
14185{
14186
14187 ;
14188 return 0;
14189}
14190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014192
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014195
14196 have_ucs4_tcl=yes
14197
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14201$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014202
Skip Montanaro6dead952003-09-25 14:50:04 +000014203# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014204if test "$wchar_h" = yes
14205then
14206 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14208$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014209 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014211else
14212
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014214 ac_cv_wchar_t_signed=yes
14215else
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014217/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014218
14219 #include <wchar.h>
14220 int main()
14221 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014222 /* Success: exit code 0 */
14223 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014224 }
14225
14226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014227if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014228 ac_cv_wchar_t_signed=yes
14229else
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014234fi
14235
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014236fi
14237
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14239$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240fi
14241
Georg Brandl52d168a2008-01-07 18:10:24 +000014242# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014243if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014244 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014245then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014246 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014247
Matthias Kloseb9621712010-04-24 17:59:49 +000014248$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
Georg Brandl52d168a2008-01-07 18:10:24 +000014250else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014251 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014252fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14254$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014255
14256# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14258$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014259if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014261else
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 ac_cv_c_bigendian=unknown
14263 # See if we're dealing with a universal compiler.
14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265/* end confdefs.h. */
14266#ifndef __APPLE_CC__
14267 not a universal capable compiler
14268 #endif
14269 typedef int dummy;
14270
Skip Montanaro6dead952003-09-25 14:50:04 +000014271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014272if ac_fn_c_try_compile "$LINENO"; then :
14273
14274 # Check for potential -arch flags. It is not universal unless
14275 # there are at least two -arch flags with different values.
14276 ac_arch=
14277 ac_prev=
14278 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14279 if test -n "$ac_prev"; then
14280 case $ac_word in
14281 i?86 | x86_64 | ppc | ppc64)
14282 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14283 ac_arch=$ac_word
14284 else
14285 ac_cv_c_bigendian=universal
14286 break
14287 fi
14288 ;;
14289 esac
14290 ac_prev=
14291 elif test "x$ac_word" = "x-arch"; then
14292 ac_prev=arch
14293 fi
14294 done
14295fi
14296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14297 if test $ac_cv_c_bigendian = unknown; then
14298 # See if sys/param.h defines the BYTE_ORDER macro.
14299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014300/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014301#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304int
14305main ()
14306{
Matthias Kloseb9621712010-04-24 17:59:49 +000014307#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14308 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14309 && LITTLE_ENDIAN)
14310 bogus endian macros
14311 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
14313 ;
14314 return 0;
14315}
14316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014317if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014318 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014320/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014321#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014323
Martin v. Löwis11437992002-04-12 09:54:03 +000014324int
14325main ()
14326{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014327#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 not big endian
14329 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
14331 ;
14332 return 0;
14333}
14334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014335if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014336 ac_cv_c_bigendian=yes
14337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014341fi
14342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14343 fi
14344 if test $ac_cv_c_bigendian = unknown; then
14345 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014347/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014348#include <limits.h>
14349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350int
14351main ()
14352{
Matthias Kloseb9621712010-04-24 17:59:49 +000014353#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14354 bogus endian macros
14355 #endif
14356
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ;
14358 return 0;
14359}
14360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if ac_fn_c_try_compile "$LINENO"; then :
14362 # It does; now see whether it defined to _BIG_ENDIAN or not.
14363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364/* end confdefs.h. */
14365#include <limits.h>
14366
14367int
14368main ()
14369{
14370#ifndef _BIG_ENDIAN
14371 not big endian
14372 #endif
14373
14374 ;
14375 return 0;
14376}
14377_ACEOF
14378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14384fi
14385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14386 fi
14387 if test $ac_cv_c_bigendian = unknown; then
14388 # Compile a test program.
14389 if test "$cross_compiling" = yes; then :
14390 # Try to guess by grepping values from an object file.
14391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14392/* end confdefs.h. */
14393short int ascii_mm[] =
14394 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14395 short int ascii_ii[] =
14396 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14397 int use_ascii (int i) {
14398 return ascii_mm[i] + ascii_ii[i];
14399 }
14400 short int ebcdic_ii[] =
14401 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14402 short int ebcdic_mm[] =
14403 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14404 int use_ebcdic (int i) {
14405 return ebcdic_mm[i] + ebcdic_ii[i];
14406 }
14407 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409int
14410main ()
14411{
14412return use_ascii (foo) == use_ebcdic (foo);
14413 ;
14414 return 0;
14415}
14416_ACEOF
14417if ac_fn_c_try_compile "$LINENO"; then :
14418 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14419 ac_cv_c_bigendian=yes
14420 fi
14421 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14422 if test "$ac_cv_c_bigendian" = unknown; then
14423 ac_cv_c_bigendian=no
14424 else
14425 # finding both strings is unlikely to happen, but who knows?
14426 ac_cv_c_bigendian=unknown
14427 fi
14428 fi
14429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014431else
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014433/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014435int
14436main ()
14437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 /* Are we little or big endian? From Harbison&Steele. */
14440 union
14441 {
14442 long int l;
14443 char c[sizeof (long int)];
14444 } u;
14445 u.l = 1;
14446 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447
14448 ;
14449 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014450}
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014452if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014453 ac_cv_c_bigendian=no
14454else
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14464$as_echo "$ac_cv_c_bigendian" >&6; }
14465 case $ac_cv_c_bigendian in #(
14466 yes)
14467 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14468;; #(
14469 no)
14470 ;; #(
14471 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 ;; #(
14476 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014477 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014478 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014480
Michael W. Hudson54241132001-12-07 15:38:26 +000014481
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014482# ABI version string for Python extension modules. This appears between the
14483# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14484# from the following attributes which affect the ABI of this Python build (in
14485# this order):
14486#
14487# * The Python implementation (always 'cpython-' for us)
14488# * The major and minor version numbers
14489# * --with-pydebug (adds a 'd')
14490# * --with-pymalloc (adds a 'm')
14491# * --with-wide-unicode (adds a 'u')
14492#
14493# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014494# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14495# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014496
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14498$as_echo_n "checking ABIFLAGS... " >&6; }
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14500$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14502$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014503SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14505$as_echo "$SOABI" >&6; }
14506
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014507
14508case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014509 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014510 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14511 *)
14512 EXT_SUFFIX=${SHLIB_SUFFIX};;
14513esac
14514
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14516$as_echo_n "checking LDVERSION... " >&6; }
14517LDVERSION='$(VERSION)$(ABIFLAGS)'
14518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14519$as_echo "$LDVERSION" >&6; }
14520
doko@python.org87421192013-01-26 11:39:31 +010014521
doko@ubuntu.com55532312016-06-14 08:55:19 +020014522if test x$PLATFORM_TRIPLET = x; then
14523 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14524else
14525 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14526fi
doko@python.org87421192013-01-26 11:39:31 +010014527
14528
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014529# Check whether right shifting a negative integer extends the sign bit
14530# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14532$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014533if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014538 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014539else
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014541/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014542
14543int main()
14544{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014545 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014546}
14547
Martin v. Löwis11437992002-04-12 09:54:03 +000014548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014549if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014550 ac_cv_rshift_extends_sign=yes
14551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014556fi
14557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558fi
14559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14561$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014562if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014563then
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014566
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014567fi
14568
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014569# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14571$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014572if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014574else
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014577/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014578#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014579int
14580main ()
14581{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014582
14583 FILE *f = fopen("/dev/null", "r");
14584 flockfile(f);
14585 getc_unlocked(f);
14586 funlockfile(f);
14587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 ;
14589 return 0;
14590}
14591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014592if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014593 ac_cv_have_getc_unlocked=yes
14594else
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 ac_cv_have_getc_unlocked=no
14596fi
14597rm -f core conftest.err conftest.$ac_objext \
14598 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14602$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014603if test "$ac_cv_have_getc_unlocked" = yes
14604then
Martin v. Löwis11437992002-04-12 09:54:03 +000014605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014607
14608fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014609
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014610# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014611# save the value of LIBS so we don't actually link Python with readline
14612LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014613
Gregory P. Smith18820942008-09-07 06:24:49 +000014614# On some systems we need to link readline to a termcap compatible
14615# library. NOTE: Keep the precedence of listed libraries synchronised
14616# with setup.py.
14617py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14619$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014620for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014621 if test -z "$py_libtermcap"; then
14622 READLINE_LIBS="-lreadline"
14623 else
14624 READLINE_LIBS="-lreadline -l$py_libtermcap"
14625 fi
14626 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014628/* end confdefs.h. */
14629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630/* Override any GCC internal prototype to avoid an error.
14631 Use char because int might match the return type of a GCC
14632 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014633#ifdef __cplusplus
14634extern "C"
14635#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014636char readline ();
14637int
14638main ()
14639{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014641 ;
14642 return 0;
14643}
14644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014645if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014646 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014648rm -f core conftest.err conftest.$ac_objext \
14649 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014650 if test $py_cv_lib_readline = yes; then
14651 break
14652 fi
14653done
14654# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14655#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014656if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14658$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014659else
Matthias Kloseb9621712010-04-24 17:59:49 +000014660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14661$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014664
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014665fi
14666
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014667# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14669$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014670if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014672else
14673 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014674LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014676/* end confdefs.h. */
14677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678/* Override any GCC internal prototype to avoid an error.
14679 Use char because int might match the return type of a GCC
14680 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014681#ifdef __cplusplus
14682extern "C"
14683#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014684char rl_callback_handler_install ();
14685int
14686main ()
14687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014689 ;
14690 return 0;
14691}
14692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014693if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014694 ac_cv_lib_readline_rl_callback_handler_install=yes
14695else
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014698rm -f core conftest.err conftest.$ac_objext \
14699 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014700LIBS=$ac_check_lib_save_LIBS
14701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14703$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014704if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014705
Matthias Kloseb9621712010-04-24 17:59:49 +000014706$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014707
14708fi
14709
14710
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014711# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014713/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014714#include <readline/readline.h>
14715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014717 have_readline=yes
14718else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014719 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014720
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014721fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014722rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014723if test $have_readline = yes
14724then
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014726/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014727#include <readline/readline.h>
14728
14729_ACEOF
14730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014734
14735fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014736rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014737
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014739/* end confdefs.h. */
14740#include <readline/readline.h>
14741
14742_ACEOF
14743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014745
Matthias Kloseb9621712010-04-24 17:59:49 +000014746$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014747
14748fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014749rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014750
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014751fi
14752
Martin v. Löwis0daad592001-09-30 21:09:59 +000014753# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14755$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014756if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014758else
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014760LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764/* Override any GCC internal prototype to avoid an error.
14765 Use char because int might match the return type of a GCC
14766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014767#ifdef __cplusplus
14768extern "C"
14769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014770char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014771int
14772main ()
14773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 ;
14776 return 0;
14777}
14778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014780 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014781else
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014784rm -f core conftest.err conftest.$ac_objext \
14785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014786LIBS=$ac_check_lib_save_LIBS
14787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14789$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014790if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014793
Martin v. Löwis0daad592001-09-30 21:09:59 +000014794fi
14795
Michael W. Hudson54241132001-12-07 15:38:26 +000014796
Thomas Wouters89d996e2007-09-08 17:39:28 +000014797# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14799$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014800if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014802else
14803 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014804LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014806/* end confdefs.h. */
14807
14808/* Override any GCC internal prototype to avoid an error.
14809 Use char because int might match the return type of a GCC
14810 builtin and then its argument prototype would still apply. */
14811#ifdef __cplusplus
14812extern "C"
14813#endif
14814char rl_completion_display_matches_hook ();
14815int
14816main ()
14817{
14818return rl_completion_display_matches_hook ();
14819 ;
14820 return 0;
14821}
14822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014824 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14825else
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828rm -f core conftest.err conftest.$ac_objext \
14829 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014830LIBS=$ac_check_lib_save_LIBS
14831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14833$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014834if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014837
14838fi
14839
14840
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014841# also in 4.0, but not in editline
14842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14843$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14844if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14845 $as_echo_n "(cached) " >&6
14846else
14847 ac_check_lib_save_LIBS=$LIBS
14848LIBS="-lreadline $READLINE_LIBS $LIBS"
14849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14850/* end confdefs.h. */
14851
14852/* Override any GCC internal prototype to avoid an error.
14853 Use char because int might match the return type of a GCC
14854 builtin and then its argument prototype would still apply. */
14855#ifdef __cplusplus
14856extern "C"
14857#endif
14858char rl_resize_terminal ();
14859int
14860main ()
14861{
14862return rl_resize_terminal ();
14863 ;
14864 return 0;
14865}
14866_ACEOF
14867if ac_fn_c_try_link "$LINENO"; then :
14868 ac_cv_lib_readline_rl_resize_terminal=yes
14869else
14870 ac_cv_lib_readline_rl_resize_terminal=no
14871fi
14872rm -f core conftest.err conftest.$ac_objext \
14873 conftest$ac_exeext conftest.$ac_ext
14874LIBS=$ac_check_lib_save_LIBS
14875fi
14876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14877$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14878if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14879
14880$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14881
14882fi
14883
14884
Martin v. Löwis0daad592001-09-30 21:09:59 +000014885# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14887$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014888if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014890else
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014892LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896/* Override any GCC internal prototype to avoid an error.
14897 Use char because int might match the return type of a GCC
14898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014899#ifdef __cplusplus
14900extern "C"
14901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014902char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014903int
14904main ()
14905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ;
14908 return 0;
14909}
14910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014913else
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014916rm -f core conftest.err conftest.$ac_objext \
14917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014918LIBS=$ac_check_lib_save_LIBS
14919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14921$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014922if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014925
Guido van Rossum353ae582001-07-10 16:45:32 +000014926fi
14927
Jack Jansendd19cf82001-12-06 22:36:17 +000014928
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014929# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014931/* end confdefs.h. */
14932#include <readline/readline.h>
14933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014934if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014935 have_readline=yes
14936else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014937 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014938
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014939fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014940rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941if test $have_readline = yes
14942then
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014944/* end confdefs.h. */
14945#include <readline/readline.h>
14946
14947_ACEOF
14948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014950
Matthias Kloseb9621712010-04-24 17:59:49 +000014951$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014952
14953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014954rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014955
14956fi
14957
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14959$as_echo_n "checking for append_history in -lreadline... " >&6; }
14960if ${ac_cv_lib_readline_append_history+:} false; then :
14961 $as_echo_n "(cached) " >&6
14962else
14963 ac_check_lib_save_LIBS=$LIBS
14964LIBS="-lreadline $READLINE_LIBS $LIBS"
14965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14966/* end confdefs.h. */
14967
14968/* Override any GCC internal prototype to avoid an error.
14969 Use char because int might match the return type of a GCC
14970 builtin and then its argument prototype would still apply. */
14971#ifdef __cplusplus
14972extern "C"
14973#endif
14974char append_history ();
14975int
14976main ()
14977{
14978return append_history ();
14979 ;
14980 return 0;
14981}
14982_ACEOF
14983if ac_fn_c_try_link "$LINENO"; then :
14984 ac_cv_lib_readline_append_history=yes
14985else
14986 ac_cv_lib_readline_append_history=no
14987fi
14988rm -f core conftest.err conftest.$ac_objext \
14989 conftest$ac_exeext conftest.$ac_ext
14990LIBS=$ac_check_lib_save_LIBS
14991fi
14992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14993$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14994if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14995
14996$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14997
14998fi
14999
15000
Martin v. Löwis82bca632006-02-10 20:49:30 +000015001# End of readline checks: restore LIBS
15002LIBS=$LIBS_no_readline
15003
Matthias Kloseb9621712010-04-24 17:59:49 +000015004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15005$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015006if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015008else
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015011 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015014/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015015
15016int main()
15017{
15018 int val1 = nice(1);
15019 if (val1 != -1 && val1 == nice(2))
15020 exit(0);
15021 exit(1);
15022}
15023
Martin v. Löwis11437992002-04-12 09:54:03 +000015024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015026 ac_cv_broken_nice=yes
15027else
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015032fi
15033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034fi
15035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15037$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015038if test "$ac_cv_broken_nice" = yes
15039then
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
Matthias Kloseb9621712010-04-24 17:59:49 +000015041$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015042
15043fi
15044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15046$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015047if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015051 ac_cv_broken_poll=no
15052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015054/* end confdefs.h. */
15055
15056#include <poll.h>
15057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015058int main()
15059{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015060 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015061 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015062
15063 close (42);
15064
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015065 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015066 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015067 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015068 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015069 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015070 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015071 return 1;
15072}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015073
15074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015075if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015076 ac_cv_broken_poll=yes
15077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015084fi
15085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15087$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015088if test "$ac_cv_broken_poll" = yes
15089then
15090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015092
15093fi
15094
Brett Cannon43802422005-02-10 20:48:03 +000015095# 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 +000015096# (which is not required by ISO C or UNIX spec) and/or if we support
15097# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015098ac_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 +000015099#include <$ac_cv_struct_tm>
15100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101"
Victor Stinnere0be4232011-10-25 13:06:09 +020015102if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015103
15104cat >>confdefs.h <<_ACEOF
15105#define HAVE_STRUCT_TM_TM_ZONE 1
15106_ACEOF
15107
15108
15109fi
15110
15111if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015114
15115else
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15117"
Victor Stinnere0be4232011-10-25 13:06:09 +020015118if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120else
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122fi
15123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015125#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126_ACEOF
15127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15129$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015130if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015134/* end confdefs.h. */
15135#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136#if !HAVE_DECL_TZNAME
15137extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015138#endif
15139
15140int
15141main ()
15142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015144 ;
15145 return 0;
15146}
15147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015148if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015149 ac_cv_var_tzname=yes
15150else
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015153rm -f core conftest.err conftest.$ac_objext \
15154 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15157$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015158 if test $ac_cv_var_tzname = yes; then
15159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015161
15162 fi
15163fi
15164
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015165
Martin v. Löwis1d459062005-03-14 21:23:33 +000015166# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15168$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015169if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015171else
15172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015174 ac_cv_working_tzset=no
15175else
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015177/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015178
15179#include <stdlib.h>
15180#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015181#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015182
15183#if HAVE_TZNAME
15184extern char *tzname[];
15185#endif
15186
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015187int main()
15188{
Brett Cannon18367812003-09-19 00:59:16 +000015189 /* Note that we need to ensure that not only does tzset(3)
15190 do 'something' with localtime, but it works as documented
15191 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015192 This includes making sure that tzname is set properly if
15193 tm->tm_zone does not exist since it is the alternative way
15194 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015195
15196 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015197 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015198 */
15199
Martin v. Löwis1d459062005-03-14 21:23:33 +000015200 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015201 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15202
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015203 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015204 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015205 if (localtime(&groundhogday)->tm_hour != 0)
15206 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015207#if HAVE_TZNAME
15208 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15209 if (strcmp(tzname[0], "UTC") ||
15210 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15211 exit(1);
15212#endif
Brett Cannon18367812003-09-19 00:59:16 +000015213
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015214 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015215 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015216 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015217 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015218#if HAVE_TZNAME
15219 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15220 exit(1);
15221#endif
Brett Cannon18367812003-09-19 00:59:16 +000015222
15223 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15224 tzset();
15225 if (localtime(&groundhogday)->tm_hour != 11)
15226 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015227#if HAVE_TZNAME
15228 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15229 exit(1);
15230#endif
15231
15232#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015233 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15234 exit(1);
15235 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15236 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015237#endif
Brett Cannon18367812003-09-19 00:59:16 +000015238
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015239 exit(0);
15240}
15241
15242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015243if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015244 ac_cv_working_tzset=yes
15245else
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015250fi
15251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252fi
15253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15255$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015256if test "$ac_cv_working_tzset" = yes
15257then
15258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015260
15261fi
15262
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015263# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15265$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015266if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015268else
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015270/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015271#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015272int
15273main ()
15274{
15275
15276struct stat st;
15277st.st_mtim.tv_nsec = 1;
15278
15279 ;
15280 return 0;
15281}
15282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015284 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015285else
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15289fi
15290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15292$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015293if test "$ac_cv_stat_tv_nsec" = yes
15294then
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015297
15298fi
15299
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015300# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15302$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015303if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015305else
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015307/* end confdefs.h. */
15308#include <sys/stat.h>
15309int
15310main ()
15311{
15312
15313struct stat st;
15314st.st_mtimespec.tv_nsec = 1;
15315
15316 ;
15317 return 0;
15318}
15319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015321 ac_cv_stat_tv_nsec2=yes
15322else
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15326fi
15327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15329$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015330if test "$ac_cv_stat_tv_nsec2" = yes
15331then
15332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015334
15335fi
15336
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015337# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015338ac_save_cppflags="$CPPFLAGS"
15339CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015340
15341for ac_header in curses.h ncurses.h
15342do :
15343 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15344ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15345if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15346 cat >>confdefs.h <<_ACEOF
15347#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15348_ACEOF
15349
15350fi
15351
15352done
15353
15354
15355# On Solaris, term.h requires curses.h
15356for ac_header in term.h
15357do :
15358 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15359#ifdef HAVE_CURSES_H
15360#include <curses.h>
15361#endif
15362
15363"
15364if test "x$ac_cv_header_term_h" = xyes; then :
15365 cat >>confdefs.h <<_ACEOF
15366#define HAVE_TERM_H 1
15367_ACEOF
15368
15369fi
15370
15371done
15372
15373
Jack Jansen666b1e72001-10-31 12:11:48 +000015374# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15376$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015377if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015379else
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015381/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015382#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015383int
15384main ()
15385{
Jack Jansen666b1e72001-10-31 12:11:48 +000015386
15387 int rtn;
15388 rtn = mvwdelch(0,0,0);
15389
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 ;
15391 return 0;
15392}
15393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015394if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015395 ac_cv_mvwdelch_is_expression=yes
15396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15400fi
15401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15403$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015404
15405if test "$ac_cv_mvwdelch_is_expression" = yes
15406then
Martin v. Löwis11437992002-04-12 09:54:03 +000015407
Matthias Kloseb9621712010-04-24 17:59:49 +000015408$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015409
15410fi
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15413$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015414if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015416else
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015418/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015419#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015420int
15421main ()
15422{
Jack Jansen666b1e72001-10-31 12:11:48 +000015423
15424 WINDOW *w;
15425 w->_flags = 0;
15426
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ;
15428 return 0;
15429}
15430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015431if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015432 ac_cv_window_has_flags=yes
15433else
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15437fi
15438
Matthias Kloseb9621712010-04-24 17:59:49 +000015439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15440$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015441
Jack Jansen666b1e72001-10-31 12:11:48 +000015442
15443if test "$ac_cv_window_has_flags" = yes
15444then
Martin v. Löwis11437992002-04-12 09:54:03 +000015445
Matthias Kloseb9621712010-04-24 17:59:49 +000015446$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015447
15448fi
15449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15451$as_echo_n "checking for is_term_resized... " >&6; }
15452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015453/* end confdefs.h. */
15454#include <curses.h>
15455int
15456main ()
15457{
15458void *x=is_term_resized
15459 ;
15460 return 0;
15461}
15462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015464
Matthias Kloseb9621712010-04-24 17:59:49 +000015465$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015466
Matthias Kloseb159a552010-04-25 21:00:44 +000015467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015469else
Matthias Kloseb9621712010-04-24 17:59:49 +000015470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15471$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015472
15473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15475
Matthias Kloseb9621712010-04-24 17:59:49 +000015476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15477$as_echo_n "checking for resize_term... " >&6; }
15478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015479/* end confdefs.h. */
15480#include <curses.h>
15481int
15482main ()
15483{
15484void *x=resize_term
15485 ;
15486 return 0;
15487}
15488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015492
Matthias Kloseb159a552010-04-25 21:00:44 +000015493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015495else
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15497$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015498
15499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15503$as_echo_n "checking for resizeterm... " >&6; }
15504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015505/* end confdefs.h. */
15506#include <curses.h>
15507int
15508main ()
15509{
15510void *x=resizeterm
15511 ;
15512 return 0;
15513}
15514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015515if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015518
Matthias Kloseb159a552010-04-25 21:00:44 +000015519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015520$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015521else
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15523$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015524
15525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015527# last curses configure check
15528CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15531$as_echo "$as_me: checking for device files" >&6;}
15532
15533if test "x$cross_compiling" = xyes; then
15534 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15536$as_echo_n "checking for /dev/ptmx... " >&6; }
15537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15538$as_echo "not set" >&6; }
15539 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15540 fi
15541 if test "${ac_cv_file__dev_ptc+set}" != set; then
15542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15543$as_echo_n "checking for /dev/ptc... " >&6; }
15544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15545$as_echo "not set" >&6; }
15546 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15547 fi
15548fi
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15551$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015552if ${ac_cv_file__dev_ptmx+:} false; then :
15553 $as_echo_n "(cached) " >&6
15554else
15555 test "$cross_compiling" = yes &&
15556 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15557if test -r "/dev/ptmx"; then
15558 ac_cv_file__dev_ptmx=yes
15559else
15560 ac_cv_file__dev_ptmx=no
15561fi
15562fi
15563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15564$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15565if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015566
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015567fi
15568
15569if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015572
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15575$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015576if ${ac_cv_file__dev_ptc+:} false; then :
15577 $as_echo_n "(cached) " >&6
15578else
15579 test "$cross_compiling" = yes &&
15580 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15581if test -r "/dev/ptc"; then
15582 ac_cv_file__dev_ptc=yes
15583else
15584 ac_cv_file__dev_ptc=no
15585fi
15586fi
15587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15588$as_echo "$ac_cv_file__dev_ptc" >&6; }
15589if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015590
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015591fi
15592
15593if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015596
Neal Norwitz865400f2003-03-21 01:42:58 +000015597fi
15598
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015600$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015601if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015603else
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015605 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015606if test x$GCC = xyes; then
15607save_CFLAGS=$CFLAGS
15608CFLAGS="$CFLAGS -Werror -Wformat"
15609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015610/* end confdefs.h. */
15611
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015612#include <stdio.h>
15613#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015614
15615int
15616main ()
15617{
15618
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015619char *buffer;
15620sprintf(buffer, "%lld", (long long)123);
15621sprintf(buffer, "%lld", (long long)-123);
15622sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015623
15624 ;
15625 return 0;
15626}
15627_ACEOF
15628if ac_fn_c_try_compile "$LINENO"; then :
15629 ac_cv_have_long_long_format=yes
15630
15631fi
15632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015633CFLAGS=$save_CFLAGS
15634fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015635else
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015637/* end confdefs.h. */
15638
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015639#include <stdio.h>
15640#include <stddef.h>
15641#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015642
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015643#ifdef HAVE_SYS_TYPES_H
15644#include <sys/types.h>
15645#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015646
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015647int main()
15648{
15649char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015650
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015651if (sprintf(buffer, "%lld", (long long)123) < 0)
15652return 1;
15653if (strcmp(buffer, "123"))
15654return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015655
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015656if (sprintf(buffer, "%lld", (long long)-123) < 0)
15657return 1;
15658if (strcmp(buffer, "-123"))
15659return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015660
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015661if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15662return 1;
15663if (strcmp(buffer, "123"))
15664return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015665
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015666return 0;
15667}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015668
15669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015670if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015671 ac_cv_have_long_long_format=yes
15672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015677fi
15678
15679
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015680fi
15681
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015683$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015684
Mark Dickinson89d7d412009-12-31 20:50:59 +000015685if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015686then
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015689
15690fi
15691
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015692if test $ac_sys_system = Darwin
15693then
15694 LIBS="$LIBS -framework CoreFoundation"
15695fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15698$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015699if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015701else
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015703 ac_cv_have_size_t_format="cross -- assuming yes"
15704
Thomas Wouters477c8d52006-05-27 19:21:47 +000015705else
Matthias Kloseb9621712010-04-24 17:59:49 +000015706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015707/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015708
Thomas Wouters477c8d52006-05-27 19:21:47 +000015709#include <stdio.h>
15710#include <stddef.h>
15711#include <string.h>
15712
Christian Heimes2c181612007-12-17 20:04:13 +000015713#ifdef HAVE_SYS_TYPES_H
15714#include <sys/types.h>
15715#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015716
15717#ifdef HAVE_SSIZE_T
15718typedef ssize_t Py_ssize_t;
15719#elif SIZEOF_VOID_P == SIZEOF_LONG
15720typedef long Py_ssize_t;
15721#else
15722typedef int Py_ssize_t;
15723#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015724
Christian Heimes2c181612007-12-17 20:04:13 +000015725int main()
15726{
15727 char buffer[256];
15728
Thomas Wouters477c8d52006-05-27 19:21:47 +000015729 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15730 return 1;
15731
Thomas Wouters89f507f2006-12-13 04:49:30 +000015732 if (strcmp(buffer, "123"))
15733 return 1;
15734
15735 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15736 return 1;
15737
15738 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015739 return 1;
15740
15741 return 0;
15742}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015743
Thomas Wouters477c8d52006-05-27 19:21:47 +000015744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015745if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015746 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015752fi
15753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15756$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015757if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015760
15761fi
15762
Matthias Kloseb9621712010-04-24 17:59:49 +000015763ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015764#ifdef HAVE_SYS_TYPES_H
15765#include <sys/types.h>
15766#endif
15767#ifdef HAVE_SYS_SOCKET_H
15768#include <sys/socket.h>
15769#endif
15770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771"
Victor Stinnere0be4232011-10-25 13:06:09 +020015772if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015777
15778fi
15779
Michael W. Hudson54241132001-12-07 15:38:26 +000015780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15782$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015783if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015785else
Matthias Kloseb9621712010-04-24 17:59:49 +000015786 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015787 ac_cv_broken_mbstowcs=no
15788else
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015790/* end confdefs.h. */
15791
Stefan Krah19c21392012-11-22 23:47:32 +010015792#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015793#include<stdlib.h>
15794int main() {
15795 size_t len = -1;
15796 const char *str = "text";
15797 len = mbstowcs(NULL, str, 0);
15798 return (len != 4);
15799}
15800
15801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015802if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015803 ac_cv_broken_mbstowcs=no
15804else
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015809fi
15810
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015811fi
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15814$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015815if test "$ac_cv_broken_mbstowcs" = yes
15816then
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015819
15820fi
15821
Antoine Pitroub52ec782009-01-25 16:34:23 +000015822# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15824$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015825
15826# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015827if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015828 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015829if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015830then
15831
Matthias Kloseb9621712010-04-24 17:59:49 +000015832$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015833
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15835$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015836fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015837if test "$withval" = no
15838then
15839
15840$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15843$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015844fi
15845
Antoine Pitrou042b1282010-08-13 21:15:58 +000015846else
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15848$as_echo "no value specified" >&6; }
15849fi
15850
Antoine Pitroub52ec782009-01-25 16:34:23 +000015851
Matthias Kloseb17289e2012-03-15 19:51:34 +010015852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15853$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15854if ${ac_cv_computed_gotos+:} false; then :
15855 $as_echo_n "(cached) " >&6
15856else
15857 if test "$cross_compiling" = yes; then :
15858 if test "${with_computed_gotos+set}" = set; then
15859 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15860 else
15861 ac_cv_computed_gotos=no
15862 fi
15863else
15864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15865/* end confdefs.h. */
15866
15867int main(int argc, char **argv)
15868{
15869 static void *targets[1] = { &&LABEL1 };
15870 goto LABEL2;
15871LABEL1:
15872 return 0;
15873LABEL2:
15874 goto *targets[0];
15875 return 1;
15876}
15877
15878_ACEOF
15879if ac_fn_c_try_run "$LINENO"; then :
15880 ac_cv_computed_gotos=yes
15881else
15882 ac_cv_computed_gotos=no
15883fi
15884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15885 conftest.$ac_objext conftest.beam conftest.$ac_ext
15886fi
15887
15888fi
15889
15890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15891$as_echo "$ac_cv_computed_gotos" >&6; }
15892case "$ac_cv_computed_gotos" in yes*)
15893
15894$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15895
15896esac
15897
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015898case $ac_sys_system in
15899AIX*)
15900
15901$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15902 ;;
15903esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015904
Michael W. Hudson54241132001-12-07 15:38:26 +000015905
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015906
15907
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015908for h in `(cd $srcdir;echo Python/thread_*.h)`
15909do
15910 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15911done
15912
Michael W. Hudson54241132001-12-07 15:38:26 +000015913
Ned Deily0db50cf2014-07-25 12:41:31 -070015914SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15916$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015917for dir in $SRCDIRS; do
15918 if test ! -d $dir; then
15919 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015920 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015921done
Matthias Kloseb9621712010-04-24 17:59:49 +000015922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15923$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015924
Stefan Krah1919b7e2012-03-21 18:25:23 +010015925# Availability of -O2:
15926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15927$as_echo_n "checking for -O2... " >&6; }
15928saved_cflags="$CFLAGS"
15929CFLAGS="-O2"
15930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931/* end confdefs.h. */
15932
15933int
15934main ()
15935{
15936
15937
15938 ;
15939 return 0;
15940}
15941_ACEOF
15942if ac_fn_c_try_compile "$LINENO"; then :
15943 have_O2=yes
15944else
15945 have_O2=no
15946fi
15947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15949$as_echo "$have_O2" >&6; }
15950CFLAGS="$saved_cflags"
15951
15952# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15953# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15955$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15956saved_cflags="$CFLAGS"
15957CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15958if test "$have_O2" = no; then
15959 CFLAGS=""
15960fi
15961if test "$cross_compiling" = yes; then :
15962 have_glibc_memmove_bug=undefined
15963else
15964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15965/* end confdefs.h. */
15966
15967#include <stdio.h>
15968#include <stdlib.h>
15969#include <string.h>
15970void foo(void *p, void *q) { memmove(p, q, 19); }
15971int main() {
15972 char a[32] = "123456789000000000";
15973 foo(&a[9], a);
15974 if (strcmp(a, "123456789123456789000000000") != 0)
15975 return 1;
15976 foo(a, &a[9]);
15977 if (strcmp(a, "123456789000000000") != 0)
15978 return 1;
15979 return 0;
15980}
15981
15982_ACEOF
15983if ac_fn_c_try_run "$LINENO"; then :
15984 have_glibc_memmove_bug=no
15985else
15986 have_glibc_memmove_bug=yes
15987fi
15988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15989 conftest.$ac_objext conftest.beam conftest.$ac_ext
15990fi
15991
15992CFLAGS="$saved_cflags"
15993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15994$as_echo "$have_glibc_memmove_bug" >&6; }
15995if test "$have_glibc_memmove_bug" = yes; then
15996
15997$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15998
15999fi
16000
16001if test "$have_gcc_asm_for_x87" = yes; then
16002 # Some versions of gcc miscompile inline asm:
16003 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16004 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16005 case $CC in
16006 *gcc*)
16007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16008$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16009 saved_cflags="$CFLAGS"
16010 CFLAGS="-O2"
16011 if test "$cross_compiling" = yes; then :
16012 have_ipa_pure_const_bug=undefined
16013else
16014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16015/* end confdefs.h. */
16016
16017 __attribute__((noinline)) int
16018 foo(int *p) {
16019 int r;
16020 asm ( "movl \$6, (%1)\n\t"
16021 "xorl %0, %0\n\t"
16022 : "=r" (r) : "r" (p) : "memory"
16023 );
16024 return r;
16025 }
16026 int main() {
16027 int p = 8;
16028 if ((foo(&p) ? : p) != 6)
16029 return 1;
16030 return 0;
16031 }
16032
16033_ACEOF
16034if ac_fn_c_try_run "$LINENO"; then :
16035 have_ipa_pure_const_bug=no
16036else
16037 have_ipa_pure_const_bug=yes
16038fi
16039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16040 conftest.$ac_objext conftest.beam conftest.$ac_ext
16041fi
16042
16043 CFLAGS="$saved_cflags"
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16045$as_echo "$have_ipa_pure_const_bug" >&6; }
16046 if test "$have_ipa_pure_const_bug" = yes; then
16047
16048$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16049
16050 fi
16051 ;;
16052 esac
16053fi
16054
Victor Stinner4f5366e2015-01-09 02:13:19 +010016055# Check for stdatomic.h
16056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16057$as_echo_n "checking for stdatomic.h... " >&6; }
16058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16059/* end confdefs.h. */
16060
16061
16062 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016063 atomic_int value = ATOMIC_VAR_INIT(1);
16064 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016065 int main() {
16066 int loaded_value = atomic_load(&value);
16067 return 0;
16068 }
16069
16070
16071_ACEOF
16072if ac_fn_c_try_link "$LINENO"; then :
16073 have_stdatomic_h=yes
16074else
16075 have_stdatomic_h=no
16076fi
16077rm -f core conftest.err conftest.$ac_objext \
16078 conftest$ac_exeext conftest.$ac_ext
16079
16080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16081$as_echo "$have_stdatomic_h" >&6; }
16082
16083if test "$have_stdatomic_h" = yes; then
16084
16085$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16086
16087fi
16088
16089# Check for GCC >= 4.7 __atomic builtins
16090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16091$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093/* end confdefs.h. */
16094
16095
16096 volatile int val = 1;
16097 int main() {
16098 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16099 return 0;
16100 }
16101
16102
16103_ACEOF
16104if ac_fn_c_try_link "$LINENO"; then :
16105 have_builtin_atomic=yes
16106else
16107 have_builtin_atomic=no
16108fi
16109rm -f core conftest.err conftest.$ac_objext \
16110 conftest$ac_exeext conftest.$ac_ext
16111
16112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16113$as_echo "$have_builtin_atomic" >&6; }
16114
16115if test "$have_builtin_atomic" = yes; then
16116
16117$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16118
16119fi
16120
Ned Deily322f5ba2013-11-21 23:01:59 -080016121# ensurepip option
16122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16123$as_echo_n "checking for ensurepip... " >&6; }
16124
16125# Check whether --with-ensurepip was given.
16126if test "${with_ensurepip+set}" = set; then :
16127 withval=$with_ensurepip;
16128else
16129 with_ensurepip=upgrade
16130fi
16131
16132case $with_ensurepip in #(
16133 yes|upgrade) :
16134 ENSUREPIP=upgrade ;; #(
16135 install) :
16136 ENSUREPIP=install ;; #(
16137 no) :
16138 ENSUREPIP=no ;; #(
16139 *) :
16140 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16141esac
16142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16143$as_echo "$ENSUREPIP" >&6; }
16144
16145
Victor Stinner35a97c02015-03-08 02:59:09 +010016146# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16148$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16150/* end confdefs.h. */
16151
16152
16153 #include <dirent.h>
16154
16155 int main() {
16156 struct dirent entry;
16157 return entry.d_type == DT_UNKNOWN;
16158 }
16159
16160
16161_ACEOF
16162if ac_fn_c_try_link "$LINENO"; then :
16163 have_dirent_d_type=yes
16164else
16165 have_dirent_d_type=no
16166fi
16167rm -f core conftest.err conftest.$ac_objext \
16168 conftest$ac_exeext conftest.$ac_ext
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16170$as_echo "$have_dirent_d_type" >&6; }
16171
16172if test "$have_dirent_d_type" = yes; then
16173
16174$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16175
16176fi
16177
Victor Stinner9eb57c52015-03-19 22:21:49 +010016178# check if the Linux getrandom() syscall is available
16179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16180$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16182/* end confdefs.h. */
16183
16184
Victor Stinner1b80b242016-04-12 22:34:58 +020016185 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016186 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016187 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016188
16189 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016190 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016191 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016192 const int flags = GRND_NONBLOCK;
16193 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016194 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016195 return 0;
16196 }
16197
16198
16199_ACEOF
16200if ac_fn_c_try_link "$LINENO"; then :
16201 have_getrandom_syscall=yes
16202else
16203 have_getrandom_syscall=no
16204fi
16205rm -f core conftest.err conftest.$ac_objext \
16206 conftest$ac_exeext conftest.$ac_ext
16207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16208$as_echo "$have_getrandom_syscall" >&6; }
16209
16210if test "$have_getrandom_syscall" = yes; then
16211
16212$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16213
16214fi
16215
Victor Stinner3abf44e2015-09-18 15:38:37 +020016216# check if the getrandom() function is available
16217# the test was written for the Solaris function of <sys/random.h>
16218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16219$as_echo_n "checking for the getrandom() function... " >&6; }
16220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16221/* end confdefs.h. */
16222
16223
16224 #include <sys/random.h>
16225
16226 int main() {
16227 char buffer[1];
16228 const size_t buflen = sizeof(buffer);
16229 const int flags = 0;
16230 /* ignore the result, Python checks for ENOSYS at runtime */
16231 (void)getrandom(buffer, buflen, flags);
16232 return 0;
16233 }
16234
16235
16236_ACEOF
16237if ac_fn_c_try_link "$LINENO"; then :
16238 have_getrandom=yes
16239else
16240 have_getrandom=no
16241fi
16242rm -f core conftest.err conftest.$ac_objext \
16243 conftest$ac_exeext conftest.$ac_ext
16244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16245$as_echo "$have_getrandom" >&6; }
16246
16247if test "$have_getrandom" = yes; then
16248
16249$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16250
16251fi
16252
Guido van Rossum627b2d71993-12-24 10:39:16 +000016253# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016254ac_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 +000016255
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016256ac_config_files="$ac_config_files Modules/ld_so_aix"
16257
Martin v. Löwis11437992002-04-12 09:54:03 +000016258cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016259# This file is a shell script that caches the results of configure
16260# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016261# scripts and configure runs, see configure's option --config-cache.
16262# It is not useful on other systems. If it contains results you don't
16263# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016264#
Martin v. Löwis11437992002-04-12 09:54:03 +000016265# config.status only pays attention to the cache file if you give it
16266# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016267#
Skip Montanaro6dead952003-09-25 14:50:04 +000016268# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016269# loading this file, other *unset* `ac_cv_foo' will be assigned the
16270# following values.
16271
16272_ACEOF
16273
Guido van Rossumf78abae1997-01-21 22:02:36 +000016274# The following way of writing the cache mishandles newlines in values,
16275# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016277# Ultrix sh set writes to stderr and can't be redirected directly,
16278# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279(
16280 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16281 eval ac_val=\$$ac_var
16282 case $ac_val in #(
16283 *${as_nl}*)
16284 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16286$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287 esac
16288 case $ac_var in #(
16289 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016290 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16291 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 esac ;;
16293 esac
16294 done
16295
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16298 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016299 # `set' does not quote correctly, so add quotes: double-quote
16300 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016302 "s/'/'\\\\''/g;
16303 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 *)
16306 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309 esac |
16310 sort
16311) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16317 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16319 :end' >>confcache
16320if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16321 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016322 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16324$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016325 if test ! -f "$cache_file" || test -h "$cache_file"; then
16326 cat confcache >"$cache_file"
16327 else
16328 case $cache_file in #(
16329 */* | ?:*)
16330 mv -f confcache "$cache_file"$$ &&
16331 mv -f "$cache_file"$$ "$cache_file" ;; #(
16332 *)
16333 mv -f confcache "$cache_file" ;;
16334 esac
16335 fi
16336 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016337 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016338 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16339$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016340 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016341fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016342rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016343
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016344test "x$prefix" = xNONE && prefix=$ac_default_prefix
16345# Let make expand exec_prefix.
16346test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016347
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016348DEFS=-DHAVE_CONFIG_H
16349
Skip Montanaro6dead952003-09-25 14:50:04 +000016350ac_libobjs=
16351ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016352U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016353for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16354 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016356 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16358 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016359 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16360 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016361done
16362LIBOBJS=$ac_libobjs
16363
16364LTLIBOBJS=$ac_ltlibobjs
16365
16366
Martin v. Löwis11437992002-04-12 09:54:03 +000016367
Matthias Kloseb9621712010-04-24 17:59:49 +000016368
Victor Stinnere0be4232011-10-25 13:06:09 +020016369: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016370ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016371ac_clean_files_save=$ac_clean_files
16372ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016373{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16374$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16375as_write_fail=0
16376cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016377#! $SHELL
16378# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016379# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016380# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016381# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016382
Martin v. Löwis11437992002-04-12 09:54:03 +000016383debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016384ac_cs_recheck=false
16385ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016386
Matthias Kloseb9621712010-04-24 17:59:49 +000016387SHELL=\${CONFIG_SHELL-$SHELL}
16388export SHELL
16389_ASEOF
16390cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16391## -------------------- ##
16392## M4sh Initialization. ##
16393## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395# Be more Bourne compatible
16396DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016397if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 emulate sh
16399 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016400 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016401 # is contrary to our usage. Disable this feature.
16402 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016404else
Matthias Kloseb9621712010-04-24 17:59:49 +000016405 case `(set -o) 2>/dev/null` in #(
16406 *posix*) :
16407 set -o posix ;; #(
16408 *) :
16409 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016411fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016412
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414as_nl='
16415'
16416export as_nl
16417# Printing a long string crashes Solaris 7 /usr/bin/printf.
16418as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16419as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16420as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16421# Prefer a ksh shell builtin over an external printf program on Solaris,
16422# but without wasting forks for bash or zsh.
16423if test -z "$BASH_VERSION$ZSH_VERSION" \
16424 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16425 as_echo='print -r --'
16426 as_echo_n='print -rn --'
16427elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16428 as_echo='printf %s\n'
16429 as_echo_n='printf %s'
16430else
16431 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16432 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16433 as_echo_n='/usr/ucb/echo -n'
16434 else
16435 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16436 as_echo_n_body='eval
16437 arg=$1;
16438 case $arg in #(
16439 *"$as_nl"*)
16440 expr "X$arg" : "X\\(.*\\)$as_nl";
16441 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16442 esac;
16443 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16444 '
16445 export as_echo_n_body
16446 as_echo_n='sh -c $as_echo_n_body as_echo'
16447 fi
16448 export as_echo_body
16449 as_echo='sh -c $as_echo_body as_echo'
16450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016451
16452# The user is always right.
16453if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016454 PATH_SEPARATOR=:
16455 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16456 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16457 PATH_SEPARATOR=';'
16458 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461
16462# IFS
16463# We need space, tab and new line, in precisely that order. Quoting is
16464# there to prevent editors from complaining about space-tab.
16465# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16466# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467IFS=" "" $as_nl"
16468
16469# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016470as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016471case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472 *[\\/]* ) as_myself=$0 ;;
16473 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016474for as_dir in $PATH
16475do
16476 IFS=$as_save_IFS
16477 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016478 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16479 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016482 ;;
16483esac
16484# We did not find ourselves, most probably we were run as `sh COMMAND'
16485# in which case we are not to be found in the path.
16486if test "x$as_myself" = x; then
16487 as_myself=$0
16488fi
16489if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016490 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16491 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492fi
16493
Matthias Kloseb9621712010-04-24 17:59:49 +000016494# Unset variables that we do not need and which cause bugs (e.g. in
16495# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16496# suppresses any "Segmentation fault" message there. '((' could
16497# trigger a bug in pdksh 5.2.14.
16498for as_var in BASH_ENV ENV MAIL MAILPATH
16499do eval test x\${$as_var+set} = xset \
16500 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501done
16502PS1='$ '
16503PS2='> '
16504PS4='+ '
16505
16506# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016507LC_ALL=C
16508export LC_ALL
16509LANGUAGE=C
16510export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511
Matthias Kloseb9621712010-04-24 17:59:49 +000016512# CDPATH.
16513(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16514
16515
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016516# as_fn_error STATUS ERROR [LINENO LOG_FD]
16517# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016518# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16519# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016520# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016521as_fn_error ()
16522{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016523 as_status=$1; test $as_status -eq 0 && as_status=1
16524 if test "$4"; then
16525 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16526 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016527 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016528 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016529 as_fn_exit $as_status
16530} # as_fn_error
16531
16532
16533# as_fn_set_status STATUS
16534# -----------------------
16535# Set $? to STATUS, without forking.
16536as_fn_set_status ()
16537{
16538 return $1
16539} # as_fn_set_status
16540
16541# as_fn_exit STATUS
16542# -----------------
16543# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16544as_fn_exit ()
16545{
16546 set +e
16547 as_fn_set_status $1
16548 exit $1
16549} # as_fn_exit
16550
16551# as_fn_unset VAR
16552# ---------------
16553# Portably unset VAR.
16554as_fn_unset ()
16555{
16556 { eval $1=; unset $1;}
16557}
16558as_unset=as_fn_unset
16559# as_fn_append VAR VALUE
16560# ----------------------
16561# Append the text in VALUE to the end of the definition contained in VAR. Take
16562# advantage of any shell optimizations that allow amortized linear growth over
16563# repeated appends, instead of the typical quadratic growth present in naive
16564# implementations.
16565if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16566 eval 'as_fn_append ()
16567 {
16568 eval $1+=\$2
16569 }'
16570else
16571 as_fn_append ()
16572 {
16573 eval $1=\$$1\$2
16574 }
16575fi # as_fn_append
16576
16577# as_fn_arith ARG...
16578# ------------------
16579# Perform arithmetic evaluation on the ARGs, and store the result in the
16580# global $as_val. Take advantage of shells that can avoid forks. The arguments
16581# must be portable across $(()) and expr.
16582if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16583 eval 'as_fn_arith ()
16584 {
16585 as_val=$(( $* ))
16586 }'
16587else
16588 as_fn_arith ()
16589 {
16590 as_val=`expr "$@" || test $? -eq 1`
16591 }
16592fi # as_fn_arith
16593
16594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595if expr a : '\(a\)' >/dev/null 2>&1 &&
16596 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16597 as_expr=expr
16598else
16599 as_expr=false
16600fi
16601
16602if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16603 as_basename=basename
16604else
16605 as_basename=false
16606fi
16607
Matthias Kloseb9621712010-04-24 17:59:49 +000016608if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16609 as_dirname=dirname
16610else
16611 as_dirname=false
16612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614as_me=`$as_basename -- "$0" ||
16615$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16616 X"$0" : 'X\(//\)$' \| \
16617 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016618$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619 sed '/^.*\/\([^/][^/]*\)\/*$/{
16620 s//\1/
16621 q
16622 }
16623 /^X\/\(\/\/\)$/{
16624 s//\1/
16625 q
16626 }
16627 /^X\/\(\/\).*/{
16628 s//\1/
16629 q
16630 }
16631 s/.*/./; q'`
16632
Matthias Kloseb9621712010-04-24 17:59:49 +000016633# Avoid depending upon Character Ranges.
16634as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16635as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16636as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16637as_cr_digits='0123456789'
16638as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639
16640ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016641case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016643 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016645 xy) ECHO_C='\c';;
16646 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16647 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016648 esac;;
16649*)
16650 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016652
Martin v. Löwis11437992002-04-12 09:54:03 +000016653rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654if test -d conf$$.dir; then
16655 rm -f conf$$.dir/conf$$.file
16656else
16657 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016660if (echo >conf$$.file) 2>/dev/null; then
16661 if ln -s conf$$.file conf$$ 2>/dev/null; then
16662 as_ln_s='ln -s'
16663 # ... but there are two gotchas:
16664 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16665 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016666 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016668 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016669 elif ln conf$$.file conf$$ 2>/dev/null; then
16670 as_ln_s=ln
16671 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016672 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016674else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016675 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16678rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016679
Matthias Kloseb9621712010-04-24 17:59:49 +000016680
16681# as_fn_mkdir_p
16682# -------------
16683# Create "$as_dir" as a directory, including parents if necessary.
16684as_fn_mkdir_p ()
16685{
16686
16687 case $as_dir in #(
16688 -*) as_dir=./$as_dir;;
16689 esac
16690 test -d "$as_dir" || eval $as_mkdir_p || {
16691 as_dirs=
16692 while :; do
16693 case $as_dir in #(
16694 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16695 *) as_qdir=$as_dir;;
16696 esac
16697 as_dirs="'$as_qdir' $as_dirs"
16698 as_dir=`$as_dirname -- "$as_dir" ||
16699$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16700 X"$as_dir" : 'X\(//\)[^/]' \| \
16701 X"$as_dir" : 'X\(//\)$' \| \
16702 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16703$as_echo X"$as_dir" |
16704 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16705 s//\1/
16706 q
16707 }
16708 /^X\(\/\/\)[^/].*/{
16709 s//\1/
16710 q
16711 }
16712 /^X\(\/\/\)$/{
16713 s//\1/
16714 q
16715 }
16716 /^X\(\/\).*/{
16717 s//\1/
16718 q
16719 }
16720 s/.*/./; q'`
16721 test -d "$as_dir" && break
16722 done
16723 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016724 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016725
16726
16727} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016728if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016730else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016731 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016732 as_mkdir_p=false
16733fi
16734
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016735
16736# as_fn_executable_p FILE
16737# -----------------------
16738# Test if FILE is an executable regular file.
16739as_fn_executable_p ()
16740{
16741 test -f "$1" && test -x "$1"
16742} # as_fn_executable_p
16743as_test_x='test -x'
16744as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016745
16746# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016747as_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 +000016748
16749# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016750as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016751
16752
Martin v. Löwis11437992002-04-12 09:54:03 +000016753exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016754## ----------------------------------- ##
16755## Main body of $CONFIG_STATUS script. ##
16756## ----------------------------------- ##
16757_ASEOF
16758test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016759
Matthias Kloseb9621712010-04-24 17:59:49 +000016760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16761# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016762# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763# values after options handling.
16764ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016765This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016766generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016767
16768 CONFIG_FILES = $CONFIG_FILES
16769 CONFIG_HEADERS = $CONFIG_HEADERS
16770 CONFIG_LINKS = $CONFIG_LINKS
16771 CONFIG_COMMANDS = $CONFIG_COMMANDS
16772 $ $0 $@
16773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774on `(hostname || uname -n) 2>/dev/null | sed 1q`
16775"
16776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777_ACEOF
16778
Matthias Kloseb9621712010-04-24 17:59:49 +000016779case $ac_config_files in *"
16780"*) set x $ac_config_files; shift; ac_config_files=$*;;
16781esac
16782
16783case $ac_config_headers in *"
16784"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16785esac
16786
16787
16788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016789# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016790config_files="$ac_config_files"
16791config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016794
Matthias Kloseb9621712010-04-24 17:59:49 +000016795cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016796ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016797\`$as_me' instantiates files and other configuration actions
16798from templates according to the current configuration. Unless the files
16799and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016800
Matthias Kloseb9621712010-04-24 17:59:49 +000016801Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016802
16803 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016805 --config print configuration, then exit
16806 -q, --quiet, --silent
16807 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016808 -d, --debug don't remove temporary files
16809 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016810 --file=FILE[:TEMPLATE]
16811 instantiate the configuration file FILE
16812 --header=FILE[:TEMPLATE]
16813 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016814
16815Configuration files:
16816$config_files
16817
16818Configuration headers:
16819$config_headers
16820
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016821Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016824cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16825ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016826ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016827python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016828configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016829 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016830
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016831Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016832This config.status script is free software; the Free Software Foundation
16833gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834
16835ac_pwd='$ac_pwd'
16836srcdir='$srcdir'
16837INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016838MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016839test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016840_ACEOF
16841
Matthias Kloseb9621712010-04-24 17:59:49 +000016842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16843# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016844ac_need_defaults=:
16845while test $# != 0
16846do
16847 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016848 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16850 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016851 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016853 --*=)
16854 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16855 ac_optarg=
16856 ac_shift=:
16857 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016859 ac_option=$1
16860 ac_optarg=$2
16861 ac_shift=shift
16862 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016863 esac
16864
Skip Montanaro6dead952003-09-25 14:50:04 +000016865 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016866 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016867 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16868 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016870 $as_echo "$ac_cs_version"; exit ;;
16871 --config | --confi | --conf | --con | --co | --c )
16872 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 debug=: ;;
16875 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016876 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016877 case $ac_optarg in
16878 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016879 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 esac
16881 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016882 ac_need_defaults=false;;
16883 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016884 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016885 case $ac_optarg in
16886 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16887 esac
16888 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016889 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 --he | --h)
16891 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016892 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016893Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016896 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16897 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16898 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016899
16900 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016901 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016902Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016903
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
16907 esac
16908 shift
16909done
16910
Skip Montanaro6dead952003-09-25 14:50:04 +000016911ac_configure_extra_args=
16912
16913if $ac_cs_silent; then
16914 exec 6>/dev/null
16915 ac_configure_extra_args="$ac_configure_extra_args --silent"
16916fi
16917
16918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016919cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016920if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016921 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 shift
16923 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16924 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016926 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016927fi
16928
Martin v. Löwis11437992002-04-12 09:54:03 +000016929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931exec 5>>config.log
16932{
16933 echo
16934 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16935## Running $as_me. ##
16936_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016937 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016942_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016943
Matthias Kloseb9621712010-04-24 17:59:49 +000016944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945
16946# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016947for ac_config_target in $ac_config_targets
16948do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949 case $ac_config_target in
16950 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16951 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16952 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016953 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16954 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16956 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016957 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016958 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016959 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960
Victor Stinnere0be4232011-10-25 13:06:09 +020016961 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 esac
16963done
16964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966# If the user did not use the arguments to specify the items to instantiate,
16967# then the envvar interface is used. Set only those that are not.
16968# We use the long form for the default assignment because of an extremely
16969# bizarre bug on SunOS 4.1.3.
16970if $ac_need_defaults; then
16971 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16972 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16973fi
16974
Skip Montanaro6dead952003-09-25 14:50:04 +000016975# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016977# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978# Hook for its removal unless debugging.
16979# Note that there is a small window in which the directory will not be cleaned:
16980# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016981$debug ||
16982{
Victor Stinnere0be4232011-10-25 13:06:09 +020016983 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016985 : "${ac_tmp:=$tmp}"
16986 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016988 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016989}
Martin v. Löwis11437992002-04-12 09:54:03 +000016990# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016991
Martin v. Löwis11437992002-04-12 09:54:03 +000016992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016994 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016995} ||
16996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997 tmp=./conf$$-$RANDOM
16998 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016999} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017000ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017001
Matthias Kloseb9621712010-04-24 17:59:49 +000017002# Set up the scripts for CONFIG_FILES section.
17003# No need to generate them if there are no CONFIG_FILES.
17004# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017006
Matthias Kloseb9621712010-04-24 17:59:49 +000017007
17008ac_cr=`echo X | tr X '\015'`
17009# On cygwin, bash can eat \r inside `` if the user requested igncr.
17010# But we know of no other shell where ac_cr would be empty at this
17011# point, so we can use a bashism as a fallback.
17012if test "x$ac_cr" = x; then
17013 eval ac_cr=\$\'\\r\'
17014fi
17015ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17016if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017017 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017018else
17019 ac_cs_awk_cr=$ac_cr
17020fi
17021
Victor Stinnere0be4232011-10-25 13:06:09 +020017022echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017023_ACEOF
17024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025
Matthias Kloseb9621712010-04-24 17:59:49 +000017026{
17027 echo "cat >conf$$subs.awk <<_ACEOF" &&
17028 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17029 echo "_ACEOF"
17030} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017031 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17032ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033ac_delim='%!_!# '
17034for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017035 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017036 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037
Matthias Kloseb9621712010-04-24 17:59:49 +000017038 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17039 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 break
17041 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017042 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 else
17044 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046done
Matthias Kloseb9621712010-04-24 17:59:49 +000017047rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048
Matthias Kloseb9621712010-04-24 17:59:49 +000017049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017050cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017052sed -n '
17053h
17054s/^/S["/; s/!.*/"]=/
17055p
17056g
17057s/^[^!]*!//
17058:repl
17059t repl
17060s/'"$ac_delim"'$//
17061t delim
17062:nl
17063h
17064s/\(.\{148\}\)..*/\1/
17065t more1
17066s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17067p
17068n
17069b repl
17070:more1
17071s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17072p
17073g
17074s/.\{148\}//
17075t nl
17076:delim
17077h
17078s/\(.\{148\}\)..*/\1/
17079t more2
17080s/["\\]/\\&/g; s/^/"/; s/$/"/
17081p
17082b
17083:more2
17084s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17085p
17086g
17087s/.\{148\}//
17088t delim
17089' <conf$$subs.awk | sed '
17090/^[^""]/{
17091 N
17092 s/\n//
17093}
17094' >>$CONFIG_STATUS || ac_write_fail=1
17095rm -f conf$$subs.awk
17096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17097_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017098cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017099 for (key in S) S_is_set[key] = 1
17100 FS = ""
17101
17102}
17103{
17104 line = $ 0
17105 nfields = split(line, field, "@")
17106 substed = 0
17107 len = length(field[1])
17108 for (i = 2; i < nfields; i++) {
17109 key = field[i]
17110 keylen = length(key)
17111 if (S_is_set[key]) {
17112 value = S[key]
17113 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17114 len += length(value) + length(field[++i])
17115 substed = 1
17116 } else
17117 len += 1 + keylen
17118 }
17119
17120 print line
17121}
17122
17123_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17126if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17127 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17128else
17129 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017130fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017131 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017132_ACEOF
17133
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017134# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17135# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136# trailing colons and then remove the whole line if VPATH becomes empty
17137# (actually we leave an empty line to preserve line numbers).
17138if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017139 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17140h
17141s///
17142s/^/:/
17143s/[ ]*$/:/
17144s/:\$(srcdir):/:/g
17145s/:\${srcdir}:/:/g
17146s/:@srcdir@:/:/g
17147s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017149x
17150s/\(=[ ]*\).*/\1/
17151G
17152s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153s/^[^=]*=[ ]*$//
17154}'
17155fi
17156
Matthias Kloseb9621712010-04-24 17:59:49 +000017157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017158fi # test -n "$CONFIG_FILES"
17159
Matthias Kloseb9621712010-04-24 17:59:49 +000017160# Set up the scripts for CONFIG_HEADERS section.
17161# No need to generate them if there are no CONFIG_HEADERS.
17162# This happens for instance with `./config.status Makefile'.
17163if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017164cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017165BEGIN {
17166_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167
Matthias Kloseb9621712010-04-24 17:59:49 +000017168# Transform confdefs.h into an awk script `defines.awk', embedded as
17169# here-document in config.status, that substitutes the proper values into
17170# config.h.in to produce config.h.
17171
17172# Create a delimiter string that does not exist in confdefs.h, to ease
17173# handling of long lines.
17174ac_delim='%!_!# '
17175for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017176 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17177 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 break
17179 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017180 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017181 else
17182 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17183 fi
17184done
17185
17186# For the awk script, D is an array of macro values keyed by name,
17187# likewise P contains macro parameters if any. Preserve backslash
17188# newline sequences.
17189
17190ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17191sed -n '
17192s/.\{148\}/&'"$ac_delim"'/g
17193t rset
17194:rset
17195s/^[ ]*#[ ]*define[ ][ ]*/ /
17196t def
17197d
17198:def
17199s/\\$//
17200t bsnl
17201s/["\\]/\\&/g
17202s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17203D["\1"]=" \3"/p
17204s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17205d
17206:bsnl
17207s/["\\]/\\&/g
17208s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17209D["\1"]=" \3\\\\\\n"\\/p
17210t cont
17211s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17212t cont
17213d
17214:cont
17215n
17216s/.\{148\}/&'"$ac_delim"'/g
17217t clear
17218:clear
17219s/\\$//
17220t bsnlc
17221s/["\\]/\\&/g; s/^/"/; s/$/"/p
17222d
17223:bsnlc
17224s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17225b cont
17226' <confdefs.h | sed '
17227s/'"$ac_delim"'/"\\\
17228"/g' >>$CONFIG_STATUS || ac_write_fail=1
17229
17230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17231 for (key in D) D_is_set[key] = 1
17232 FS = ""
17233}
17234/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17235 line = \$ 0
17236 split(line, arg, " ")
17237 if (arg[1] == "#") {
17238 defundef = arg[2]
17239 mac1 = arg[3]
17240 } else {
17241 defundef = substr(arg[1], 2)
17242 mac1 = arg[2]
17243 }
17244 split(mac1, mac2, "(") #)
17245 macro = mac2[1]
17246 prefix = substr(line, 1, index(line, defundef) - 1)
17247 if (D_is_set[macro]) {
17248 # Preserve the white space surrounding the "#".
17249 print prefix "define", macro P[macro] D[macro]
17250 next
17251 } else {
17252 # Replace #undef with comments. This is necessary, for example,
17253 # in the case of _POSIX_SOURCE, which is predefined and required
17254 # on some systems where configure will not decide to define it.
17255 if (defundef == "undef") {
17256 print "/*", prefix defundef, macro, "*/"
17257 next
17258 }
17259 }
17260}
17261{ print }
17262_ACAWK
17263_ACEOF
17264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017265 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017266fi # test -n "$CONFIG_HEADERS"
17267
17268
17269eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17270shift
17271for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272do
17273 case $ac_tag in
17274 :[FHLC]) ac_mode=$ac_tag; continue;;
17275 esac
17276 case $ac_mode$ac_tag in
17277 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017278 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279 :[FH]-) ac_tag=-:-;;
17280 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17281 esac
17282 ac_save_IFS=$IFS
17283 IFS=:
17284 set x $ac_tag
17285 IFS=$ac_save_IFS
17286 shift
17287 ac_file=$1
17288 shift
17289
17290 case $ac_mode in
17291 :L) ac_source=$1;;
17292 :[FH])
17293 ac_file_inputs=
17294 for ac_f
17295 do
17296 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017297 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298 *) # Look for the file first in the build tree, then in the source tree
17299 # (if the path is not absolute). The absolute path cannot be DOS-style,
17300 # because $ac_f cannot contain `:'.
17301 test -f "$ac_f" ||
17302 case $ac_f in
17303 [\\/$]*) false;;
17304 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17305 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017306 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17309 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310 done
17311
17312 # Let's still pretend it is `configure' which instantiates (i.e., don't
17313 # use $as_me), people would be surprised to read:
17314 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017315 configure_input='Generated from '`
17316 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17317 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318 if test x"$ac_file" != x-; then
17319 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17321$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017323 # Neutralize special characters interpreted by sed in replacement strings.
17324 case $configure_input in #(
17325 *\&* | *\|* | *\\* )
17326 ac_sed_conf_input=`$as_echo "$configure_input" |
17327 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17328 *) ac_sed_conf_input=$configure_input;;
17329 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330
17331 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017332 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17333 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334 esac
17335 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017336 esac
17337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017339$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017340 X"$ac_file" : 'X\(//\)[^/]' \| \
17341 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017343$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17345 s//\1/
17346 q
17347 }
17348 /^X\(\/\/\)[^/].*/{
17349 s//\1/
17350 q
17351 }
17352 /^X\(\/\/\)$/{
17353 s//\1/
17354 q
17355 }
17356 /^X\(\/\).*/{
17357 s//\1/
17358 q
17359 }
17360 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017361 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 ac_builddir=.
17363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364case "$ac_dir" in
17365.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17366*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 case $ac_top_builddir_sub in
17371 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17372 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17373 esac ;;
17374esac
17375ac_abs_top_builddir=$ac_pwd
17376ac_abs_builddir=$ac_pwd$ac_dir_suffix
17377# for backward compatibility:
17378ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017379
17380case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017382 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383 ac_top_srcdir=$ac_top_builddir_sub
17384 ac_abs_top_srcdir=$ac_pwd ;;
17385 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017386 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 ac_top_srcdir=$srcdir
17388 ac_abs_top_srcdir=$srcdir ;;
17389 *) # Relative name.
17390 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17391 ac_top_srcdir=$ac_top_build_prefix$srcdir
17392 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017393esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017395
Martin v. Löwis11437992002-04-12 09:54:03 +000017396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 case $ac_mode in
17398 :F)
17399 #
17400 # CONFIG_FILE
17401 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
17403 case $INSTALL in
17404 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017406 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017407 ac_MKDIR_P=$MKDIR_P
17408 case $MKDIR_P in
17409 [\\/$]* | ?:[\\/]* ) ;;
17410 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17411 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017412_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413
Matthias Kloseb9621712010-04-24 17:59:49 +000017414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415# If the template does not know about datarootdir, expand it.
17416# FIXME: This hack should be removed a few years after 2.60.
17417ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017418ac_sed_dataroot='
17419/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 p
17421 q
17422}
17423/@datadir@/p
17424/@docdir@/p
17425/@infodir@/p
17426/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017427/@mandir@/p'
17428case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429*datarootdir*) ac_datarootdir_seen=yes;;
17430*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17432$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 ac_datarootdir_hack='
17436 s&@datadir@&$datadir&g
17437 s&@docdir@&$docdir&g
17438 s&@infodir@&$infodir&g
17439 s&@localedir@&$localedir&g
17440 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017441 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442esac
17443_ACEOF
17444
17445# Neutralize VPATH when `$srcdir' = `.'.
17446# Shell code in configure.ac might set extrasub.
17447# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17449ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017450$extrasub
17451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017453:t
17454/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017455s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017457s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458s&@srcdir@&$ac_srcdir&;t t
17459s&@abs_srcdir@&$ac_abs_srcdir&;t t
17460s&@top_srcdir@&$ac_top_srcdir&;t t
17461s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17462s&@builddir@&$ac_builddir&;t t
17463s&@abs_builddir@&$ac_abs_builddir&;t t
17464s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17465s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017466s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017468"
Victor Stinnere0be4232011-10-25 13:06:09 +020017469eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17470 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017473 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17474 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17475 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017477which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017478$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017479which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017480
Victor Stinnere0be4232011-10-25 13:06:09 +020017481 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017483 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17484 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017486 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487 ;;
17488 :H)
17489 #
17490 # CONFIG_HEADER
17491 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017492 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017493 {
17494 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017495 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17496 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017497 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017498 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017499 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17500$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017503 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017504 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 fi
17506 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017507 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017508 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017509 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017510 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017513
17514 esac
17515
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017516
17517 case $ac_file$ac_mode in
17518 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17519
17520 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521done # for ac_tag
17522
Guido van Rossum627b2d71993-12-24 10:39:16 +000017523
Matthias Kloseb9621712010-04-24 17:59:49 +000017524as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017525_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017526ac_clean_files=$ac_clean_files_save
17527
Matthias Kloseb9621712010-04-24 17:59:49 +000017528test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017529 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017530
Martin v. Löwis11437992002-04-12 09:54:03 +000017531
17532# configure is writing to config.log, and then calls config.status.
17533# config.status does its own redirection, appending to config.log.
17534# Unfortunately, on DOS this fails, as config.log is still kept open
17535# by configure, so config.status won't be able to write to it; its
17536# output is simply discarded. So we exec the FD to /dev/null,
17537# effectively closing config.log, so it can be properly (re)opened and
17538# appended to by config.status. When coming back to configure, we
17539# need to make the FD available again.
17540if test "$no_create" != yes; then
17541 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017542 ac_config_status_args=
17543 test "$silent" = yes &&
17544 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017546 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 exec 5>>config.log
17548 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17549 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017550 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017551fi
17552if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17554$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017555fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017556
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017557
Christian Heimes75ed8902013-11-20 01:11:18 +010017558echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017559if test ! -f Modules/Setup
17560then
17561 cp $srcdir/Modules/Setup.dist Modules/Setup
17562fi
17563
Christian Heimes75ed8902013-11-20 01:11:18 +010017564echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017565if test ! -f Modules/Setup.local
17566then
17567 echo "# Edit this file for local setup changes" >Modules/Setup.local
17568fi
17569
Christian Heimes75ed8902013-11-20 01:11:18 +010017570echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017571$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17572 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017573 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017574mv config.c Modules