blob: 94a74353f4a20f2e1ebb2d6b4484a0121ce562a5 [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
Brett Cannon63d98bc2016-09-06 17:12:40 -0700677DEF_MAKE_RULE
678DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000679ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000680LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100681MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000682INSTALL_DATA
683INSTALL_SCRIPT
684INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200685ac_ct_READELF
686READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000687ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200688ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000689AR
690RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000691USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000692GNULD
693LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000694LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000695RUNSHARED
696INSTSONAME
697LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000698PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000699BLDLIBRARY
700DLLLIBRARY
701LDLIBRARY
702LIBRARY
703BUILDEXEEXT
704EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200705NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200706MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200708PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200709MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200710ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711MAINCC
712CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713GREP
714CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000715OBJEXT
716EXEEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722EXPORT_MACOSX_DEPLOYMENT_TARGET
723CONFIGURE_MACOSX_DEPLOYMENT_TARGET
724SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000726MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000727FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800729FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000745GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200746PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200747PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100748host_os
749host_vendor
750host_cpu
751host
752build_os
753build_vendor
754build_cpu
755build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500756HAS_HG
757HGBRANCH
758HGTAG
759HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400760BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000761target_alias
762host_alias
763build_alias
764LIBS
765ECHO_T
766ECHO_N
767ECHO_C
768DEFS
769mandir
770localedir
771libdir
772psdir
773pdfdir
774dvidir
775htmldir
776infodir
777docdir
778oldincludedir
779includedir
Benjamin Petersona9296e72016-09-07 11:06:17 -0700780runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000800ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000801ac_user_opts='
802enable_option_checking
803enable_universalsdk
804with_universal_archs
805with_framework_name
806enable_framework
807with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600808with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700814with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700815with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100816with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100817with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_libs
819with_system_expat
820with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100821with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000822enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700823with_tcltk_includes
824with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_dbmliborder
826with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_threads
828with_thread
829enable_ipv6
830with_doc_strings
831with_tsc
832with_pymalloc
833with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_fpectl
835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000840'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 ac_precious_vars='build_alias
842host_alias
843target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100844MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845CC
846CFLAGS
847LDFLAGS
848LIBS
849CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100850CPP
851PKG_CONFIG
852PKG_CONFIG_PATH
853PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854
Guido van Rossum627b2d71993-12-24 10:39:16 +0000855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000857ac_init_help=
858ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000859ac_unrecognized_opts=
860ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# The variables have the same names as the options, with
862# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866no_recursion=
867prefix=NONE
868program_prefix=NONE
869program_suffix=NONE
870program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875x_includes=NONE
876x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878# Installation directory options.
879# These are left unexpanded so users can "make install exec_prefix=/foo"
880# and all the variables that are supposed to be based on exec_prefix
881# by default will actually change.
882# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884bindir='${exec_prefix}/bin'
885sbindir='${exec_prefix}/sbin'
886libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887datarootdir='${prefix}/share'
888datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889sysconfdir='${prefix}/etc'
890sharedstatedir='${prefix}/com'
891localstatedir='${prefix}/var'
Benjamin Petersona9296e72016-09-07 11:06:17 -0700892runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893includedir='${prefix}/include'
894oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
896infodir='${datarootdir}/info'
897htmldir='${docdir}'
898dvidir='${docdir}'
899pdfdir='${docdir}'
900psdir='${docdir}'
901libdir='${exec_prefix}/lib'
902localedir='${datarootdir}/locale'
903mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 # If the previous option needs an argument, assign it.
910 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 ac_prev=
913 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918 *=) ac_optarg= ;;
919 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Accept the important Cygnus configure options, so we can diagnose typos.
923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_dashdash$ac_option in
925 --)
926 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -bindir | --bindir | --bindi | --bind | --bin | --bi)
929 ac_prev=bindir ;;
930 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
933 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 -cache-file | --cache-file | --cache-fil | --cache-fi \
939 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940 ac_prev=cache_file ;;
941 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 cache_file=$ac_optarg ;;
944
945 --config-cache | -C)
946 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954 | --dataroo | --dataro | --datar)
955 ac_prev=datarootdir ;;
956 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958 datarootdir=$ac_optarg ;;
959
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200964 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt_orig=$ac_useropt
966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967 case $ac_user_opts in
968 *"
969"enable_$ac_useropt"
970"*) ;;
971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972 ac_unrecognized_sep=', ';;
973 esac
974 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975
976 -docdir | --docdir | --docdi | --doc | --do)
977 ac_prev=docdir ;;
978 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979 docdir=$ac_optarg ;;
980
981 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982 ac_prev=dvidir ;;
983 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200990 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt_orig=$ac_useropt
992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1003 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1004 | --exec | --exe | --ex)
1005 ac_prev=exec_prefix ;;
1006 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1007 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1008 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 # Obsolete; use --with-gas.
1013 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 -help | --help | --hel | --he | -h)
1016 ac_init_help=long ;;
1017 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1018 ac_init_help=recursive ;;
1019 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1020 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1028 ac_prev=htmldir ;;
1029 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1030 | --ht=*)
1031 htmldir=$ac_optarg ;;
1032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -includedir | --includedir | --includedi | --included | --include \
1034 | --includ | --inclu | --incl | --inc)
1035 ac_prev=includedir ;;
1036 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1037 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -infodir | --infodir | --infodi | --infod | --info | --inf)
1041 ac_prev=infodir ;;
1042 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libdir | --libdir | --libdi | --libd)
1046 ac_prev=libdir ;;
1047 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1051 | --libexe | --libex | --libe)
1052 ac_prev=libexecdir ;;
1053 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1054 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -localedir | --localedir | --localedi | --localed | --locale)
1058 ac_prev=localedir ;;
1059 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1060 localedir=$ac_optarg ;;
1061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 ac_prev=localstatedir ;;
1065 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1070 ac_prev=mandir ;;
1071 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Obsolete; use --without-fp.
1076 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 no_create=yes ;;
1081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1083 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1084 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1087 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1088 | --oldin | --oldi | --old | --ol | --o)
1089 ac_prev=oldincludedir ;;
1090 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1091 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1092 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1096 ac_prev=prefix ;;
1097 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1101 | --program-pre | --program-pr | --program-p)
1102 ac_prev=program_prefix ;;
1103 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1104 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1108 | --program-suf | --program-su | --program-s)
1109 ac_prev=program_suffix ;;
1110 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1111 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-transform-name | --program-transform-name \
1115 | --program-transform-nam | --program-transform-na \
1116 | --program-transform-n | --program-transform- \
1117 | --program-transform | --program-transfor \
1118 | --program-transfo | --program-transf \
1119 | --program-trans | --program-tran \
1120 | --progr-tra | --program-tr | --program-t)
1121 ac_prev=program_transform_name ;;
1122 -program-transform-name=* | --program-transform-name=* \
1123 | --program-transform-nam=* | --program-transform-na=* \
1124 | --program-transform-n=* | --program-transform-=* \
1125 | --program-transform=* | --program-transfor=* \
1126 | --program-transfo=* | --program-transf=* \
1127 | --program-trans=* | --program-tran=* \
1128 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001131 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1132 ac_prev=pdfdir ;;
1133 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1134 pdfdir=$ac_optarg ;;
1135
1136 -psdir | --psdir | --psdi | --psd | --ps)
1137 ac_prev=psdir ;;
1138 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1139 psdir=$ac_optarg ;;
1140
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1142 | -silent | --silent | --silen | --sile | --sil)
1143 silent=yes ;;
1144
Benjamin Petersona9296e72016-09-07 11:06:17 -07001145 -runstatedir | --runstatedir | --runstatedi | --runstated \
1146 | --runstate | --runstat | --runsta | --runst | --runs \
1147 | --run | --ru | --r)
1148 ac_prev=runstatedir ;;
1149 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1150 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1151 | --run=* | --ru=* | --r=*)
1152 runstatedir=$ac_optarg ;;
1153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155 ac_prev=sbindir ;;
1156 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
1160 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162 | --sharedst | --shareds | --shared | --share | --shar \
1163 | --sha | --sh)
1164 ac_prev=sharedstatedir ;;
1165 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 -site | --site | --sit)
1172 ac_prev=site ;;
1173 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177 ac_prev=srcdir ;;
1178 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182 | --syscon | --sysco | --sysc | --sys | --sy)
1183 ac_prev=sysconfdir ;;
1184 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194 verbose=yes ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 -version | --version | --versio | --versi | --vers | -V)
1197 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
1221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 --x)
1232 # Obsolete; use --with-x.
1233 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236 | --x-incl | --x-inc | --x-in | --x-i)
1237 ac_prev=x_includes ;;
1238 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244 ac_prev=x_libraries ;;
1245 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 *=*)
1254 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_envvar in #(
1257 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 export $ac_envvar ;;
1262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001268 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ;;
1270
1271 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272done
1273
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277fi
1278
Matthias Kloseb9621712010-04-24 17:59:49 +00001279if test -n "$ac_unrecognized_opts"; then
1280 case $enable_option_checking in
1281 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284 esac
1285fi
1286
1287# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289 datadir sysconfdir sharedstatedir localstatedir includedir \
1290 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersona9296e72016-09-07 11:06:17 -07001291 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 # Remove trailing slashes.
1295 case $ac_val in
1296 */ )
1297 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298 eval $ac_var=\$ac_val;;
1299 esac
1300 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 [\\/$]* | ?:[\\/]* ) continue;;
1303 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317 if test "x$build_alias" = x; then
1318 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 elif test "x$build_alias" != "x$host_alias"; then
1320 cross_compiling=yes
1321 fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344 X"$as_myself" : 'X\(//\)[^/]' \| \
1345 X"$as_myself" : 'X\(//\)$' \| \
1346 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)[^/].*/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\).*/{
1361 s//\1/
1362 q
1363 }
1364 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367 srcdir=..
1368 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372if test ! -r "$srcdir/$ac_unique_file"; then
1373 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379 pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382 srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_env_${ac_var}_value=\$${ac_var}
1393 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401 # Omit some internal or obsolete options to make the list less imposing.
1402 # This message is too long to be a string in the A/UX 3.1 sh.
1403 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001404\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE. See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414 -h, --help display this help and exit
1415 --help=short display options specific to this package
1416 --help=recursive display the short help of all the included packages
1417 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001418 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --cache-file=FILE cache test results in FILE [disabled]
1420 -C, --config-cache alias for \`--cache-file=config.cache'
1421 -n, --no-create do not create output files
1422 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1423
Martin v. Löwis11437992002-04-12 09:54:03 +00001424Installation directories:
1425 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --bindir=DIR user executables [EPREFIX/bin]
1439 --sbindir=DIR system admin executables [EPREFIX/sbin]
1440 --libexecdir=DIR program executables [EPREFIX/libexec]
1441 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1442 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1443 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersona9296e72016-09-07 11:06:17 -07001444 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --libdir=DIR object code libraries [EPREFIX/lib]
1446 --includedir=DIR C header files [PREFIX/include]
1447 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1448 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1449 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1450 --infodir=DIR info documentation [DATAROOTDIR/info]
1451 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1452 --mandir=DIR man documentation [DATAROOTDIR/man]
1453 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1454 --htmldir=DIR html documentation [DOCDIR]
1455 --dvidir=DIR dvi documentation [DOCDIR]
1456 --pdfdir=DIR pdf documentation [DOCDIR]
1457 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459
1460 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001461
1462System types:
1463 --build=BUILD configure for building on BUILD [guessed]
1464 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001470 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 cat <<\_ACEOF
1473
1474Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1477 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001478 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001479 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-framework[=INSTALLDIR]
1481 Build (MacOSX|Darwin) framework
1482 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001483 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001484 --enable-loadable-sqlite-extensions
1485 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-ipv6 Enable ipv6 (with ipv4) support
1487 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001488 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491Optional Packages:
1492 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1493 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001494 --with-universal-archs=ARCH
1495 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001496 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001497 --with-framework-name=FRAMEWORK
1498 specify an alternate name of the framework built
1499 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001501 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001502 --with-cxx-main=<compiler>
1503 compile main() and link python executable with C++
1504 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with-suffix=.exe set executable suffix
1506 --with-pydebug build with Py_DEBUG defined
Brett Cannon63d98bc2016-09-06 17:12:40 -07001507 --with-optimizations Enable all optimizations when available (LTO, PGO,
1508 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001509 --with-lto Enable Link Time Optimization in PGO builds.
1510 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001511 --with-hash-algorithm=[fnv|siphash24]
1512 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001513 --with-address-sanitizer
1514 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001516 --with-system-expat build pyexpat module using an installed expat
1517 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001518 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001519 --with-system-libmpdec build _decimal module using an installed libmpdec
1520 library
Ned Deilyd819b932013-09-06 01:07:05 -07001521 --with-tcltk-includes='-I...'
1522 override search for Tcl and Tk include files
1523 --with-tcltk-libs='-L...'
1524 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001525 --with-dbmliborder=db1:db2:...
1526 order to check db backends for dbm. Valid value is a
1527 colon separated string with the backend names
1528 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-threads[=DIRECTORY]
1531 disable/enable thread support
1532 --with(out)-thread[=DIRECTORY]
1533 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001535 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-fpectl enable SIGFPE catching
1539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001548 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CC C compiler command
1550 CFLAGS C compiler flags
1551 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1552 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001557 PKG_CONFIG path to pkg-config utility
1558 PKG_CONFIG_PATH
1559 directories to add to pkg-config's search path
1560 PKG_CONFIG_LIBDIR
1561 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001562
1563Use these variables to override the choices made by `configure' or to help
1564it to find libraries and programs with nonstandard names/locations.
1565
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001566Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
1570
1571if test "$ac_init_help" = "recursive"; then
1572 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 test -d "$ac_dir" ||
1575 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1576 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_builddir=.
1578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579case "$ac_dir" in
1580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 case $ac_top_builddir_sub in
1586 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1588 esac ;;
1589esac
1590ac_abs_top_builddir=$ac_pwd
1591ac_abs_builddir=$ac_pwd$ac_dir_suffix
1592# for backward compatibility:
1593ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$ac_top_builddir_sub
1599 ac_abs_top_srcdir=$ac_pwd ;;
1600 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$srcdir
1603 ac_abs_top_srcdir=$srcdir ;;
1604 *) # Relative name.
1605 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1606 ac_top_srcdir=$ac_top_build_prefix$srcdir
1607 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001608esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 cd "$ac_dir" || { ac_status=$?; continue; }
1612 # Check for guested configure.
1613 if test -f "$ac_srcdir/configure.gnu"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1616 elif test -f "$ac_srcdir/configure"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 fi || ac_status=$?
1622 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 done
1624fi
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001627if $ac_init_version; then
1628 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001629python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001633This configure script is free software; the Free Software Foundation
1634gives unlimited permission to copy, distribute and modify it.
1635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001638
1639## ------------------------ ##
1640## Autoconf initialization. ##
1641## ------------------------ ##
1642
1643# ac_fn_c_try_compile LINENO
1644# --------------------------
1645# Try to compile conftest.$ac_ext, and return whether this succeeded.
1646ac_fn_c_try_compile ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext
1650 if { { ac_try="$ac_compile"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_compile") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest.$ac_objext; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_compile
1680
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } > conftest.i && {
1703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
Matthias Kloseb9621712010-04-24 17:59:49 +00001718# ac_fn_c_try_link LINENO
1719# -----------------------
1720# Try to link conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_c_try_link ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext conftest$ac_exeext
1725 if { { ac_try="$ac_link"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_link") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest$ac_exeext && {
1744 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001745 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
1754 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1755 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1756 # interfere with the next link command; also delete a directory that is
1757 # left behind by Apple's compiler. We do this before executing the actions.
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_link
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1767# the include files in INCLUDES and setting the cache variable VAR
1768# accordingly.
1769ac_fn_c_check_header_mongrel ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777fi
1778eval ac_res=\$$3
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1780$as_echo "$ac_res" >&6; }
1781else
1782 # Is the header compilable?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1784$as_echo_n "checking $2 usability... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787$4
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791 ac_header_compiler=yes
1792else
1793 ac_header_compiler=no
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1797$as_echo "$ac_header_compiler" >&6; }
1798
1799# Is the header present?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1801$as_echo_n "checking $2 presence... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_cpp "$LINENO"; then :
1807 ac_header_preproc=yes
1808else
1809 ac_header_preproc=no
1810fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1813$as_echo "$ac_header_preproc" >&6; }
1814
1815# So? What about this header?
1816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1817 yes:no: )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1819$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1822 ;;
1823 no:yes:* )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1825$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1827$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1829$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1831$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1833$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001834( $as_echo "## --------------------------------------- ##
1835## Report this to https://bugs.python.org/ ##
1836## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 ) | sed "s/^/$as_me: WARNING: /" >&2
1838 ;;
1839esac
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 eval "$3=\$ac_header_compiler"
1846fi
1847eval ac_res=\$$3
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1849$as_echo "$ac_res" >&6; }
1850fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852
1853} # ac_fn_c_check_header_mongrel
1854
1855# ac_fn_c_try_run LINENO
1856# ----------------------
1857# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1858# that executables *can* be run.
1859ac_fn_c_try_run ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { { ac_try="$ac_link"
1863case "(($ac_try" in
1864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865 *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869 (eval "$ac_link") 2>&5
1870 ac_status=$?
1871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1873 { { case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_try") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; }; }; then :
1883 ac_retval=0
1884else
1885 $as_echo "$as_me: program exited with status $ac_status" >&5
1886 $as_echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889 ac_retval=$ac_status
1890fi
1891 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 as_fn_set_status $ac_retval
1894
1895} # ac_fn_c_try_run
1896
1897# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898# -------------------------------------------------------
1899# Tests whether HEADER exists and can be compiled using the include files in
1900# INCLUDES, setting the cache variable VAR accordingly.
1901ac_fn_c_check_header_compile ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912#include <$2>
1913_ACEOF
1914if ac_fn_c_try_compile "$LINENO"; then :
1915 eval "$3=yes"
1916else
1917 eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_header_compile
1927
Matthias Kloseb9621712010-04-24 17:59:49 +00001928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_check_type
1981
Matthias Kloseb9621712010-04-24 17:59:49 +00001982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=0 ac_mid=0
2008 while :; do
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_hi=$ac_mid; break
2025else
2026 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2027 if test $ac_lo -le $ac_mid; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002173if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229
2230} # ac_fn_c_check_func
2231
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002232# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2233# ---------------------------------------------
2234# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2235# accordingly.
2236ac_fn_c_check_decl ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 as_decl_name=`echo $2|sed 's/ *(.*//'`
2240 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2242$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2243if eval \${$3+:} false; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252#ifndef $as_decl_name
2253#ifdef __cplusplus
2254 (void) $as_decl_use;
2255#else
2256 (void) $as_decl_name;
2257#endif
2258#endif
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
2274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275
2276} # ac_fn_c_check_decl
2277
Matthias Kloseb9621712010-04-24 17:59:49 +00002278# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2279# ----------------------------------------------------
2280# Tries to find if the field MEMBER exists in type AGGR, after including
2281# INCLUDES, setting cache variable VAR accordingly.
2282ac_fn_c_check_member ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2286$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$5
2293int
2294main ()
2295{
2296static $2 ac_aggr;
2297if (ac_aggr.$3)
2298return 0;
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303if ac_fn_c_try_compile "$LINENO"; then :
2304 eval "$4=yes"
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (sizeof ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 eval "$4=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$4
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002338It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002339generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002597See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Trent Nelson4d4ec652012-10-16 08:51:24 -04002687
Trent Nelson5595ab52012-10-17 04:47:31 -04002688if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689 # If we're building out-of-tree, we need to make sure the following
2690 # resources get picked up before their $srcdir counterparts.
2691 # Objects/ -> typeslots.inc
2692 # Include/ -> Python-ast.h, graminit.h
2693 # Python/ -> importlib.h
2694 # (A side effect of this is that these resources will automatically be
2695 # regenerated when building out-of-tree, regardless of whether or not
2696 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2697 # off.)
2698 BASECPPFLAGS="-IObjects -IInclude -IPython"
2699else
2700 BASECPPFLAGS=""
2701fi
2702
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703
2704
2705
2706
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002707if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708then
2709# Extract the first word of "hg", so it can be a program name with args.
2710set dummy hg; ac_word=$2
2711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002713if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 $as_echo_n "(cached) " >&6
2715else
2716 if test -n "$HAS_HG"; then
2717 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726 ac_cv_prog_HAS_HG="found"
2727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731 done
2732IFS=$as_save_IFS
2733
2734 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2735fi
2736fi
2737HAS_HG=$ac_cv_prog_HAS_HG
2738if test -n "$HAS_HG"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2740$as_echo "$HAS_HG" >&6; }
2741else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743$as_echo "no" >&6; }
2744fi
2745
2746
2747else
2748HAS_HG=no-repository
2749fi
2750if test $HAS_HG = found
2751then
2752 HGVERSION="hg id -i \$(srcdir)"
2753 HGTAG="hg id -t \$(srcdir)"
2754 HGBRANCH="hg id -b \$(srcdir)"
2755else
2756 HGVERSION=""
2757 HGTAG=""
2758 HGBRANCH=""
2759fi
2760
2761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
2764
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002765ac_aux_dir=
2766for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2767 if test -f "$ac_dir/install-sh"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/install-sh -c"
2770 break
2771 elif test -f "$ac_dir/install.sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install.sh -c"
2774 break
2775 elif test -f "$ac_dir/shtool"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/shtool install -c"
2778 break
2779 fi
2780done
2781if test -z "$ac_aux_dir"; then
2782 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2783fi
2784
2785# These three variables are undocumented and unsupported,
2786# and are intended to be withdrawn in a future Autoconf release.
2787# They can cause serious problems if a builder's source tree is in a directory
2788# whose full name contains unusual characters.
2789ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2790ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2791ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2792
2793
2794# Make sure we can run config.sub.
2795$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2796 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2797
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2799$as_echo_n "checking build system type... " >&6; }
2800if ${ac_cv_build+:} false; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 ac_build_alias=$build_alias
2804test "x$ac_build_alias" = x &&
2805 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2806test "x$ac_build_alias" = x &&
2807 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2808ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2810
2811fi
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2813$as_echo "$ac_cv_build" >&6; }
2814case $ac_cv_build in
2815*-*-*) ;;
2816*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2817esac
2818build=$ac_cv_build
2819ac_save_IFS=$IFS; IFS='-'
2820set x $ac_cv_build
2821shift
2822build_cpu=$1
2823build_vendor=$2
2824shift; shift
2825# Remember, the first character of IFS is used to create $*,
2826# except with old shells:
2827build_os=$*
2828IFS=$ac_save_IFS
2829case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2833$as_echo_n "checking host system type... " >&6; }
2834if ${ac_cv_host+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 if test "x$host_alias" = x; then
2838 ac_cv_host=$ac_cv_build
2839else
2840 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2841 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2842fi
2843
2844fi
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2846$as_echo "$ac_cv_host" >&6; }
2847case $ac_cv_host in
2848*-*-*) ;;
2849*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2850esac
2851host=$ac_cv_host
2852ac_save_IFS=$IFS; IFS='-'
2853set x $ac_cv_host
2854shift
2855host_cpu=$1
2856host_vendor=$2
2857shift; shift
2858# Remember, the first character of IFS is used to create $*,
2859# except with old shells:
2860host_os=$*
2861IFS=$ac_save_IFS
2862case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2863
2864
2865
doko@python.orga10e4a92013-01-25 18:45:12 +01002866
2867
Ned Deilyfcbc2462014-08-22 13:32:49 -07002868# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2869rm -f pybuilddir.txt
2870
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002871for ac_prog in python$PACKAGE_VERSION python3 python
2872do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874set dummy $ac_prog; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
2877if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2878 $as_echo_n "(cached) " >&6
2879else
2880 if test -n "$PYTHON_FOR_GEN"; then
2881 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2882else
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2890 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
2900PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2901if test -n "$PYTHON_FOR_GEN"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2903$as_echo "$PYTHON_FOR_GEN" >&6; }
2904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
2910 test -n "$PYTHON_FOR_GEN" && break
2911done
2912test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2913
2914if test "$PYTHON_FOR_GEN" = not-found; then
2915 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2916 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2917 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2918fi
2919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 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 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002937 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 +02002938 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002939 # Used to comment out stuff for rebuilding generated files
2940 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002945 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Martin Pantereac67be2016-07-28 01:28:27 +00002950
Benjamin Petersond23f8222009-04-05 19:13:16 +00002951if test "$prefix" != "/"; then
2952 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
2957
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002958# We don't use PACKAGE_ variables, and they cause conflicts
2959# with other autoconf-based packages that include Python.h
2960grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2961rm confdefs.h
2962mv confdefs.h.new confdefs.h
2963
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002964
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002965VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002966
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002967# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002968
2969SOVERSION=1.0
2970
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971# The later defininition of _XOPEN_SOURCE disables certain features
2972# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975
2976
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982
2983
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989
2990
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002995
2996
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002
3003
3004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003007# Arguments passed to configure.
3008
3009CONFIG_ARGS="$ac_configure_args"
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3012$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003014if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 case $enableval in
3017 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 # Locate the best usable SDK, see Mac/README.txt for more
3019 # information
3020 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003021 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3024 if test ! -d "${enableval}"
3025 then
3026 enableval=/
3027 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
3031 case $enableval in
3032 no)
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035 ;;
3036 *)
3037 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 if test ! -d "${UNIVERSALSDK}"
3039 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003040 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046else
3047
3048 UNIVERSALSDK=
3049 enable_universalsdk=
3050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053if test -n "${UNIVERSALSDK}"
3054then
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3056$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057else
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deily87adb6e2013-10-18 21:09:56 -07003064ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003073 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 UNIVERSAL_ARCHS="$withval"
3088
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089fi
3090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091if test -n "${UNIVERSALSDK}"
3092then
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3095else
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097$as_echo "no" >&6; }
3098fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100
3101# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103 withval=$with_framework_name;
3104 PYTHONFRAMEWORK=${withval}
3105 PYTHONFRAMEWORKDIR=${withval}.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3107
3108else
3109
3110 PYTHONFRAMEWORK=Python
3111 PYTHONFRAMEWORKDIR=Python.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3113
3114fi
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003117if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003119 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003120 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003121 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 esac
3123 case $enableval in
3124 no)
3125 PYTHONFRAMEWORK=
3126 PYTHONFRAMEWORKDIR=no-framework
3127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003148 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 if test "x${prefix}" = "xNONE" ; then
3152 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
3158 case "${enableval}" in
3159 /System*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 if test "${prefix}" = "NONE" ; then
3162 # See below
3163 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3164 fi
3165 ;;
3166
3167 /Library*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 ;;
3170
3171 */Library/Frameworks)
3172 MDIR="`dirname "${enableval}"`"
3173 MDIR="`dirname "${MDIR}"`"
3174 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3175
3176 if test "${prefix}" = "NONE"; then
3177 # User hasn't specified the
3178 # --prefix option, but wants to install
3179 # the framework in a non-default location,
3180 # ensure that the compatibility links get
3181 # installed relative to that prefix as well
3182 # instead of in /usr/local.
3183 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3184 fi
3185 ;;
3186
3187 *)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190 esac
3191
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3201
3202 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3203
Jack Jansene578a632001-08-15 01:27:14 +00003204 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Guido van Rossum563e7081996-09-10 18:20:48 +00003206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORKPREFIX=
3211 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 FRAMEWORKINSTALLFIRST=
3213 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 FRAMEWORKALTINSTALLFIRST=
3215 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003252 # ac_sys_system and ac_sys_release are used for setting
3253 # a lot of different things including 'define_xopen_source'
3254 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 case "$host" in
3256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
3262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003287 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On FreeBSD 4, the math functions C89 does not cover are never defined
3369 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3370 FreeBSD/4.*)
3371 define_xopen_source=no;;
3372 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3373 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3374 # identifies itself as Darwin/7.*
3375 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # disables platform specific features beyond repair.
3377 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # has no effect, don't bother defining them
3379 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003380 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003381 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3384 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3385 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003386 AIX/4)
3387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 AIX/5)
3389 if test `uname -r` -eq 1; then
3390 define_xopen_source=no
3391 fi
3392 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003393 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3394 # defining NI_NUMERICHOST.
3395 QNX/6.3.2)
3396 define_xopen_source=no
3397 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003398
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399esac
3400
3401if test $define_xopen_source = yes
3402then
Victor Stinner14d098d2011-09-07 22:29:43 +02003403 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Victor Stinner14d098d2011-09-07 22:29:43 +02003405$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3409 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3410 # several APIs are not declared. Since this is also needed in some
3411 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Matthias Kloseb9621712010-04-24 17:59:49 +00003413$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003417$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419fi
3420
Christian Heimes647cd872013-12-07 23:39:33 +01003421# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3422case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423 hp*|HP*)
3424 define_stdc_a1=yes;;
3425 *)
3426 define_stdc_a1=no;;
3427esac
3428
3429if test $define_stdc_a1 = yes
3430then
Christian Heimes647cd872013-12-07 23:39:33 +01003431
3432$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3433
Christian Heimesb02bcae2013-12-08 15:21:08 +01003434fi
Christian Heimes647cd872013-12-07 23:39:33 +01003435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003439# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Zachary Ware5af85642015-12-21 12:09:17 -06003499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3500$as_echo_n "checking for --with-icc... " >&6; }
3501
3502# Check whether --with-icc was given.
3503if test "${with_icc+set}" = set; then :
3504 withval=$with_icc;
3505 case $withval in
3506 no) CC=${CC:-cc}
3507 with_icc=no;;
3508 yes) CC=icc
3509 CXX=icpc
3510 with_icc=yes;;
3511 *) CC=$withval
3512 with_icc=$withval;;
3513 esac
3514else
3515
3516 with_icc=no
3517fi
3518
3519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3520$as_echo "$with_icc" >&6; }
3521
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522# If the user switches compilers, we can't believe the cache
3523if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3524then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003525 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003526(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527fi
3528
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003529# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3530# when the compiler supports them, but we don't always want -O2, and
3531# we set -g later.
3532if test -z "$CFLAGS"; then
3533 CFLAGS=
3534fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535
3536if test "$ac_sys_system" = "Darwin"
3537then
3538 # Compiler selection on MacOSX is more complicated than
3539 # AC_PROG_CC can handle, see Mac/README.txt for more
3540 # information
3541 if test -z "${CC}"
3542 then
3543 found_gcc=
3544 found_clang=
3545 as_save_IFS=$IFS; IFS=:
3546 for as_dir in $PATH
3547 do
3548 IFS=$as_save_IFS
3549 if test -x $as_dir/gcc; then
3550 if test -z "${found_gcc}"; then
3551 found_gcc=$as_dir/gcc
3552 fi
3553 fi
3554 if test -x $as_dir/clang; then
3555 if test -z "${found_clang}"; then
3556 found_clang=$as_dir/clang
3557 fi
3558 fi
3559 done
3560 IFS=$as_save_IFS
3561
3562 if test -n "$found_gcc" -a -n "$found_clang"
3563 then
3564 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3567$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3568 CC="$found_clang"
3569 CXX="$found_clang++"
3570 fi
3571
3572
3573 elif test -z "$found_gcc" -a -n "$found_clang"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3576$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579
3580 elif test -z "$found_gcc" -a -z "$found_clang"
3581 then
3582 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3583 if test -n "${found_clang}"
3584 then
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3586$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3587 CC="${found_clang}"
3588 CXX="`/usr/bin/xcrun -find clang++`"
3589
3590 # else: use default behaviour
3591 fi
3592 fi
3593 fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595ac_ext=c
3596ac_cpp='$CPP $CPPFLAGS'
3597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3599ac_compiler_gnu=$ac_cv_c_compiler_gnu
3600if test -n "$ac_tool_prefix"; then
3601 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3602set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003605if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003607else
3608 if test -n "$CC"; then
3609 ac_cv_prog_CC="$CC" # Let the user override the test.
3610else
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $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 +00003620 break 2
3621 fi
3622done
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626fi
3627fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003628CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003629if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3631$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003632else
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3634$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638fi
3639if test -z "$ac_cv_prog_CC"; then
3640 ac_ct_CC=$CC
3641 # Extract the first word of "gcc", so it can be a program name with args.
3642set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003645if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 if test -n "$ac_ct_CC"; then
3649 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3650else
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 $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 +00003660 break 2
3661 fi
3662done
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003665
3666fi
3667fi
3668ac_ct_CC=$ac_cv_prog_ac_ct_CC
3669if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3671$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672else
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677 if test "x$ac_ct_CC" = x; then
3678 CC=""
3679 else
3680 case $cross_compiling:$ac_tool_warned in
3681yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003682{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684ac_tool_warned=yes ;;
3685esac
3686 CC=$ac_ct_CC
3687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688else
3689 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003690fi
3691
Jack Jansendd19cf82001-12-06 22:36:17 +00003692if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 if test -n "$ac_tool_prefix"; then
3694 # 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 +00003695set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003698if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003700else
3701 if test -n "$CC"; then
3702 ac_cv_prog_CC="$CC" # Let the user override the test.
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $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 +00003713 break 2
3714 fi
3715done
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003718
3719fi
3720fi
3721CC=$ac_cv_prog_CC
3722if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3724$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725else
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3727$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733if test -z "$CC"; then
3734 # Extract the first word of "cc", so it can be a program name with args.
3735set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003738if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
3741 if test -n "$CC"; then
3742 ac_cv_prog_CC="$CC" # Let the user override the test.
3743else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746for as_dir in $PATH
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3753 ac_prog_rejected=yes
3754 continue
3755 fi
3756 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $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 +00003758 break 2
3759 fi
3760done
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764if test $ac_prog_rejected = yes; then
3765 # We found a bogon in the path, so make sure we never use it.
3766 set dummy $ac_cv_prog_CC
3767 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 # We chose a different compiler from the bogus one.
3770 # However, it has the same basename, so the bogon will be chosen
3771 # first if we set CC to just the basename; use the full file name.
3772 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003773 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 fi
3775fi
3776fi
3777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3781$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782else
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3784$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785fi
3786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789if test -z "$CC"; then
3790 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 do
3793 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3794set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003797if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003799else
3800 if test -n "$CC"; then
3801 ac_cv_prog_CC="$CC" # Let the user override the test.
3802else
Martin v. Löwis11437992002-04-12 09:54:03 +00003803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3804for as_dir in $PATH
3805do
3806 IFS=$as_save_IFS
3807 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $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 +00003812 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814done
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
3818fi
3819fi
3820CC=$ac_cv_prog_CC
3821if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3823$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003827fi
3828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 test -n "$CC" && break
3831 done
3832fi
3833if test -z "$CC"; then
3834 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003836do
3837 # Extract the first word of "$ac_prog", so it can be a program name with args.
3838set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3840$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003841if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
3844 if test -n "$ac_ct_CC"; then
3845 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3846else
3847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848for as_dir in $PATH
3849do
3850 IFS=$as_save_IFS
3851 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 $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 +00003856 break 2
3857 fi
3858done
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863fi
3864ac_ct_CC=$ac_cv_prog_ac_ct_CC
3865if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3867$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868else
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 test -n "$ac_ct_CC" && break
3875done
Michael W. Hudson54241132001-12-07 15:38:26 +00003876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 if test "x$ac_ct_CC" = x; then
3878 CC=""
3879 else
3880 case $cross_compiling:$ac_tool_warned in
3881yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_tool_warned=yes ;;
3885esac
3886 CC=$ac_ct_CC
3887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888fi
3889
3890fi
3891
3892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003895as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003896See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
3898# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003899$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3900set X $ac_compile
3901ac_compiler=$2
3902for ac_option in --version -v -V -qversion; do
3903 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3909$as_echo "$ac_try_echo"; } >&5
3910 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 if test -s conftest.err; then
3913 sed '10a\
3914... rest of stderr output deleted ...
3915 10q' conftest.err >conftest.er1
3916 cat conftest.er1 >&5
3917 fi
3918 rm -f conftest.er1 conftest.err
3919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3920 test $ac_status = 0; }
3921done
Martin v. Löwis11437992002-04-12 09:54:03 +00003922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003924/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926int
3927main ()
3928{
3929
3930 ;
3931 return 0;
3932}
3933_ACEOF
3934ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003935ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003936# Try to create an executable without -o first, disregard a.out.
3937# It will help us diagnose broken compilers, and finding out an intuition
3938# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3940$as_echo_n "checking whether the C compiler works... " >&6; }
3941ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3942
3943# The possible output files:
3944ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946ac_rmfiles=
3947for ac_file in $ac_files
3948do
3949 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3952 esac
3953done
3954rm -f $ac_rmfiles
3955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957case "(($ac_try" in
3958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959 *) ac_try_echo=$ac_try;;
3960esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3962$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3968# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3969# in a Makefile. We should not override ac_cv_exeext if it was cached,
3970# so that the user can short-circuit this test for compilers unknown to
3971# Autoconf.
3972for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003973do
3974 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 ;;
3978 [ab].out )
3979 # We found the default executable, but exeext='' is most
3980 # certainly right.
3981 break;;
3982 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 then :; else
3985 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3986 fi
3987 # We set ac_cv_exeext here because the later test for it is not
3988 # safe: cross compilers may not add the suffix if given an `-o'
3989 # argument, so we may need to know it at that point already.
3990 # Even if this section looks crufty: it has the advantage of
3991 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992 break;;
3993 * )
3994 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 esac
3996done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997test "$ac_cv_exeext" = no && ac_cv_exeext=
3998
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003999else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_file=''
4001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004002if test -z "$ac_file"; then :
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004$as_echo "no" >&6; }
4005$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004006sed 's/^/| /' conftest.$ac_ext >&5
4007
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004010as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004011See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004012else
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4014$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4017$as_echo_n "checking for C compiler default output file name... " >&6; }
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4019$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4025$as_echo_n "checking for suffix of executables... " >&6; }
4026if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4038# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4039# work properly (i.e., refer to `conftest.exe'), while it won't with
4040# `rm'.
4041for ac_file in conftest.exe conftest conftest.*; do
4042 test -f "$ac_file" || continue
4043 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4046 break;;
4047 * ) break;;
4048 esac
4049done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050else
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004053as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004054See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004056rm -f conftest conftest$ac_cv_exeext
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4058$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059
4060rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004061EXEEXT=$ac_cv_exeext
4062ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4064/* end confdefs.h. */
4065#include <stdio.h>
4066int
4067main ()
4068{
4069FILE *f = fopen ("conftest.out", "w");
4070 return ferror (f) || fclose (f) != 0;
4071
4072 ;
4073 return 0;
4074}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004076ac_clean_files="$ac_clean_files conftest.out"
4077# Check that the compiler produces executables we can run. If not, either
4078# the compiler is broken, or we cross compile.
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4080$as_echo_n "checking whether we are cross compiling... " >&6; }
4081if test "$cross_compiling" != yes; then
4082 { { ac_try="$ac_link"
4083case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086esac
4087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088$as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_link") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }
4093 if { ac_try='./conftest$ac_cv_exeext'
4094 { { case "(($ac_try" in
4095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096 *) ac_try_echo=$ac_try;;
4097esac
4098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4099$as_echo "$ac_try_echo"; } >&5
4100 (eval "$ac_try") 2>&5
4101 ac_status=$?
4102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4103 test $ac_status = 0; }; }; then
4104 cross_compiling=no
4105 else
4106 if test "$cross_compiling" = maybe; then
4107 cross_compiling=yes
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004111as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004112If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004113See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 fi
4115 fi
4116fi
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4118$as_echo "$cross_compiling" >&6; }
4119
4120rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4121ac_clean_files=$ac_clean_files_save
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4123$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004124if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo_n "(cached) " >&6
4126else
4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128/* end confdefs.h. */
4129
4130int
4131main ()
4132{
4133
4134 ;
4135 return 0;
4136}
4137_ACEOF
4138rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004139if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150 for ac_file in conftest.o conftest.obj conftest.*; do
4151 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4155 break;;
4156 esac
4157done
4158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004160sed 's/^/| /' conftest.$ac_ext >&5
4161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004164as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004165See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004167rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4170$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171OBJEXT=$ac_cv_objext
4172ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4174$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004175if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181int
4182main ()
4183{
4184#ifndef __GNUC__
4185 choke me
4186#endif
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 ac_compiler_gnu=yes
4194else
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004198ac_cv_c_compiler_gnu=$ac_compiler_gnu
4199
4200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4202$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4203if test $ac_compiler_gnu = yes; then
4204 GCC=yes
4205else
4206 GCC=
4207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208ac_test_CFLAGS=${CFLAGS+set}
4209ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4211$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004212if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004214else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 ac_save_c_werror_flag=$ac_c_werror_flag
4216 ac_c_werror_flag=yes
4217 ac_cv_prog_cc_g=no
4218 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
Martin v. Löwis11437992002-04-12 09:54:03 +00004222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 CFLAGS=""
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
4248 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251/* end confdefs.h. */
4252
4253int
4254main ()
4255{
4256
4257 ;
4258 return 0;
4259}
4260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004261if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4269 ac_c_werror_flag=$ac_save_c_werror_flag
4270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4272$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004275elif test $ac_cv_prog_cc_g = yes; then
4276 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004277 CFLAGS="-g -O2"
4278 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280 fi
4281else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282 if test "$GCC" = yes; then
4283 CFLAGS="-O2"
4284 else
4285 CFLAGS=
4286 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4289$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004290if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004292else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004294ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
4297#include <stdarg.h>
4298#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004299struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4301struct buf { int x; };
4302FILE * (*rcsopen) (struct buf *, struct stat *, int);
4303static char *e (p, i)
4304 char **p;
4305 int i;
4306{
4307 return p[i];
4308}
4309static char *f (char * (*g) (char **, int), char **p, ...)
4310{
4311 char *s;
4312 va_list v;
4313 va_start (v,p);
4314 s = g (p, va_arg (v,int));
4315 va_end (v);
4316 return s;
4317}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318
4319/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4320 function prototypes and stuff, but not '\xHH' hex character constants.
4321 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4324 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4329 inside strings and character constants. */
4330#define FOO(x) 'x'
4331int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4332
Skip Montanaro6dead952003-09-25 14:50:04 +00004333int test (int i, double x);
4334struct s1 {int (*f) (int a);};
4335struct s2 {int (*f) (double a);};
4336int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4337int argc;
4338char **argv;
4339int
4340main ()
4341{
4342return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4343 ;
4344 return 0;
4345}
4346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4348 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004349do
4350 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f core conftest.err conftest.$ac_objext
4355 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004356done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004358CC=$ac_save_CC
4359
4360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361# AC_CACHE_VAL
4362case "x$ac_cv_prog_cc_c89" in
4363 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4365$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4368$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4372$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004373esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004375
Matthias Kloseb9621712010-04-24 17:59:49 +00004376fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378ac_ext=c
4379ac_cpp='$CPP $CPPFLAGS'
4380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4382ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4390$as_echo_n "checking how to run the C preprocessor... " >&6; }
4391# On Suns, sometimes $CPP names a directory.
4392if test -n "$CPP" && test -d "$CPP"; then
4393 CPP=
4394fi
4395if test -z "$CPP"; then
4396 if ${ac_cv_prog_CPP+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398else
4399 # Double quotes because CPP needs to be expanded
4400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4401 do
4402 ac_preproc_ok=false
4403for ac_c_preproc_warn_flag in '' yes
4404do
4405 # Use a header file that comes with gcc, so configuring glibc
4406 # with a fresh cross-compiler works.
4407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4408 # <limits.h> exists even on freestanding compilers.
4409 # On the NeXT, cc -E runs the code through the compiler's parser,
4410 # not just through cpp. "Syntax error" is here to catch this case.
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h. */
4413#ifdef __STDC__
4414# include <limits.h>
4415#else
4416# include <assert.h>
4417#endif
4418 Syntax error
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421
4422else
4423 # Broken: fails on valid input.
4424continue
4425fi
4426rm -f conftest.err conftest.i conftest.$ac_ext
4427
4428 # OK, works on sane cases. Now check whether nonexistent headers
4429 # can be detected and how.
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h. */
4432#include <ac_nonexistent.h>
4433_ACEOF
4434if ac_fn_c_try_cpp "$LINENO"; then :
4435 # Broken: success on invalid input.
4436continue
4437else
4438 # Passes both tests.
4439ac_preproc_ok=:
4440break
4441fi
4442rm -f conftest.err conftest.i conftest.$ac_ext
4443
4444done
4445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4446rm -f conftest.i conftest.err conftest.$ac_ext
4447if $ac_preproc_ok; then :
4448 break
4449fi
4450
4451 done
4452 ac_cv_prog_CPP=$CPP
4453
4454fi
4455 CPP=$ac_cv_prog_CPP
4456else
4457 ac_cv_prog_CPP=$CPP
4458fi
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4460$as_echo "$CPP" >&6; }
4461ac_preproc_ok=false
4462for ac_c_preproc_warn_flag in '' yes
4463do
4464 # Use a header file that comes with gcc, so configuring glibc
4465 # with a fresh cross-compiler works.
4466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4467 # <limits.h> exists even on freestanding compilers.
4468 # On the NeXT, cc -E runs the code through the compiler's parser,
4469 # not just through cpp. "Syntax error" is here to catch this case.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#ifdef __STDC__
4473# include <limits.h>
4474#else
4475# include <assert.h>
4476#endif
4477 Syntax error
4478_ACEOF
4479if ac_fn_c_try_cpp "$LINENO"; then :
4480
4481else
4482 # Broken: fails on valid input.
4483continue
4484fi
4485rm -f conftest.err conftest.i conftest.$ac_ext
4486
4487 # OK, works on sane cases. Now check whether nonexistent headers
4488 # can be detected and how.
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h. */
4491#include <ac_nonexistent.h>
4492_ACEOF
4493if ac_fn_c_try_cpp "$LINENO"; then :
4494 # Broken: success on invalid input.
4495continue
4496else
4497 # Passes both tests.
4498ac_preproc_ok=:
4499break
4500fi
4501rm -f conftest.err conftest.i conftest.$ac_ext
4502
4503done
4504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4505rm -f conftest.i conftest.err conftest.$ac_ext
4506if $ac_preproc_ok; then :
4507
4508else
4509 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4512See \`config.log' for more details" "$LINENO" 5; }
4513fi
4514
4515ac_ext=c
4516ac_cpp='$CPP $CPPFLAGS'
4517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4519ac_compiler_gnu=$ac_cv_c_compiler_gnu
4520
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4522$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4523if ${ac_cv_path_GREP+:} false; then :
4524 $as_echo_n "(cached) " >&6
4525else
4526 if test -z "$GREP"; then
4527 ac_path_GREP_found=false
4528 # Loop through the user's path and test for each of PROGNAME-LIST
4529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
4534 for ac_prog in grep ggrep; do
4535 for ac_exec_ext in '' $ac_executable_extensions; do
4536 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4537 as_fn_executable_p "$ac_path_GREP" || continue
4538# Check for GNU ac_path_GREP and select it if it is found.
4539 # Check for GNU $ac_path_GREP
4540case `"$ac_path_GREP" --version 2>&1` in
4541*GNU*)
4542 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4543*)
4544 ac_count=0
4545 $as_echo_n 0123456789 >"conftest.in"
4546 while :
4547 do
4548 cat "conftest.in" "conftest.in" >"conftest.tmp"
4549 mv "conftest.tmp" "conftest.in"
4550 cp "conftest.in" "conftest.nl"
4551 $as_echo 'GREP' >> "conftest.nl"
4552 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4553 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4554 as_fn_arith $ac_count + 1 && ac_count=$as_val
4555 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4556 # Best one so far, save it but keep looking for a better one
4557 ac_cv_path_GREP="$ac_path_GREP"
4558 ac_path_GREP_max=$ac_count
4559 fi
4560 # 10*(2^10) chars as input seems more than enough
4561 test $ac_count -gt 10 && break
4562 done
4563 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4564esac
4565
4566 $ac_path_GREP_found && break 3
4567 done
4568 done
4569 done
4570IFS=$as_save_IFS
4571 if test -z "$ac_cv_path_GREP"; then
4572 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4573 fi
4574else
4575 ac_cv_path_GREP=$GREP
4576fi
4577
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4580$as_echo "$ac_cv_path_GREP" >&6; }
4581 GREP="$ac_cv_path_GREP"
4582
4583
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004584
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
4586
Matthias Kloseb9621712010-04-24 17:59:49 +00004587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4588$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004590# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594 case $withval in
4595 no) with_cxx_main=no
4596 MAINCC='$(CC)';;
4597 yes) with_cxx_main=yes
4598 MAINCC='$(CXX)';;
4599 *) with_cxx_main=yes
4600 MAINCC=$withval
4601 if test -z "$CXX"
4602 then
4603 CXX=$withval
4604 fi;;
4605 esac
4606else
4607
4608 with_cxx_main=no
4609 MAINCC='$(CC)'
4610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004611fi
4612
Matthias Kloseb9621712010-04-24 17:59:49 +00004613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4614$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616preset_cxx="$CXX"
4617if test -z "$CXX"
4618then
4619 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004620 gcc) if test -n "$ac_tool_prefix"; then
4621 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4622set dummy ${ac_tool_prefix}g++; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
4648 ;;
4649esac
4650fi
4651CXX=$ac_cv_path_CXX
4652if test -n "$CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4654$as_echo "$CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661fi
4662if test -z "$ac_cv_path_CXX"; then
4663 ac_pt_CXX=$CXX
4664 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668if ${ac_cv_path_ac_pt_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $ac_pt_CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4674 ;;
4675 *)
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in notfound
4678do
4679 IFS=$as_save_IFS
4680 test -z "$as_dir" && as_dir=.
4681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685 break 2
4686 fi
4687done
4688 done
4689IFS=$as_save_IFS
4690
4691 ;;
4692esac
4693fi
4694ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4695if test -n "$ac_pt_CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4697$as_echo "$ac_pt_CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703 if test "x$ac_pt_CXX" = x; then
4704 CXX="g++"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_pt_CXX
4713 fi
4714else
4715 CXX="$ac_cv_path_CXX"
4716fi
4717 ;;
4718 cc) if test -n "$ac_tool_prefix"; then
4719 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4720set dummy ${ac_tool_prefix}c++; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004723if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725else
4726 case $CXX in
4727 [\\/]* | ?:[\\/]*)
4728 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4729 ;;
4730 *)
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in notfound
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 break 2
4741 fi
4742done
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004744IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 ;;
4747esac
4748fi
4749CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004750if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4752$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753else
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758
4759fi
4760if test -z "$ac_cv_path_CXX"; then
4761 ac_pt_CXX=$CXX
4762 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 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 +00004772 ;;
4773 *)
4774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4775for as_dir in notfound
4776do
4777 IFS=$as_save_IFS
4778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004781 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 break 2
4784 fi
4785done
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 ;;
4790esac
4791fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4793if test -n "$ac_pt_CXX"; then
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4795$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796else
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4798$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 if test "x$ac_pt_CXX" = x; then
4802 CXX="c++"
4803 else
4804 case $cross_compiling:$ac_tool_warned in
4805yes:)
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4808ac_tool_warned=yes ;;
4809esac
4810 CXX=$ac_pt_CXX
4811 fi
4812else
4813 CXX="$ac_cv_path_CXX"
4814fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 clang|*/clang) if test -n "$ac_tool_prefix"; then
4817 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4818set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
4821if ${ac_cv_path_CXX+:} false; then :
4822 $as_echo_n "(cached) " >&6
4823else
4824 case $CXX in
4825 [\\/]* | ?:[\\/]*)
4826 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in notfound
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004836 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840done
4841 done
4842IFS=$as_save_IFS
4843
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844 ;;
4845esac
4846fi
4847CXX=$ac_cv_path_CXX
4848if test -n "$CXX"; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4850$as_echo "$CXX" >&6; }
4851else
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4853$as_echo "no" >&6; }
4854fi
4855
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856
4857fi
4858if test -z "$ac_cv_path_CXX"; then
4859 ac_pt_CXX=$CXX
4860 # Extract the first word of "clang++", so it can be a program name with args.
4861set dummy clang++; ac_word=$2
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_ac_pt_CXX+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 case $ac_pt_CXX in
4868 [\\/]* | ?:[\\/]*)
4869 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4870 ;;
4871 *)
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in notfound
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
4877 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881 break 2
4882 fi
4883done
4884 done
4885IFS=$as_save_IFS
4886
4887 ;;
4888esac
4889fi
4890ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4891if test -n "$ac_pt_CXX"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4893$as_echo "$ac_pt_CXX" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899 if test "x$ac_pt_CXX" = x; then
4900 CXX="clang++"
4901 else
4902 case $cross_compiling:$ac_tool_warned in
4903yes:)
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906ac_tool_warned=yes ;;
4907esac
4908 CXX=$ac_pt_CXX
4909 fi
4910else
4911 CXX="$ac_cv_path_CXX"
4912fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004914 icc|*/icc) if test -n "$ac_tool_prefix"; then
4915 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4916set dummy ${ac_tool_prefix}icpc; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_CXX+:} false; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 case $CXX in
4923 [\\/]* | ?:[\\/]*)
4924 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4925 ;;
4926 *)
4927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in notfound
4929do
4930 IFS=$as_save_IFS
4931 test -z "$as_dir" && as_dir=.
4932 for ac_exec_ext in '' $ac_executable_extensions; do
4933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4934 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936 break 2
4937 fi
4938done
4939 done
4940IFS=$as_save_IFS
4941
4942 ;;
4943esac
4944fi
4945CXX=$ac_cv_path_CXX
4946if test -n "$CXX"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4948$as_echo "$CXX" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955fi
4956if test -z "$ac_cv_path_CXX"; then
4957 ac_pt_CXX=$CXX
4958 # Extract the first word of "icpc", so it can be a program name with args.
4959set dummy icpc; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if ${ac_cv_path_ac_pt_CXX+:} false; then :
4963 $as_echo_n "(cached) " >&6
4964else
4965 case $ac_pt_CXX in
4966 [\\/]* | ?:[\\/]*)
4967 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4968 ;;
4969 *)
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in notfound
4972do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981done
4982 done
4983IFS=$as_save_IFS
4984
4985 ;;
4986esac
4987fi
4988ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4989if test -n "$ac_pt_CXX"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4991$as_echo "$ac_pt_CXX" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997 if test "x$ac_pt_CXX" = x; then
4998 CXX="icpc"
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001yes:)
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004ac_tool_warned=yes ;;
5005esac
5006 CXX=$ac_pt_CXX
5007 fi
5008else
5009 CXX="$ac_cv_path_CXX"
5010fi
5011 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005012 esac
5013 if test "$CXX" = "notfound"
5014 then
5015 CXX=""
5016 fi
5017fi
5018if test -z "$CXX"
5019then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005020 if test -n "$ac_tool_prefix"; then
5021 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5022 do
5023 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005027if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005029else
5030 if test -n "$CXX"; then
5031 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042 break 2
5043 fi
5044done
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047
5048fi
5049fi
5050CXX=$ac_cv_prog_CXX
5051if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5053$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054else
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057fi
5058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 test -n "$CXX" && break
5061 done
5062fi
5063if test -z "$CXX"; then
5064 ac_ct_CXX=$CXX
5065 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5066do
5067 # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073else
5074 if test -n "$ac_ct_CXX"; then
5075 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 ac_cv_prog_ac_ct_CXX="$ac_prog"
5085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005089 done
5090IFS=$as_save_IFS
5091
5092fi
5093fi
5094ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5095if test -n "$ac_ct_CXX"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5097$as_echo "$ac_ct_CXX" >&6; }
5098else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104 test -n "$ac_ct_CXX" && break
5105done
5106
5107 if test "x$ac_ct_CXX" = x; then
5108 CXX="notfound"
5109 else
5110 case $cross_compiling:$ac_tool_warned in
5111yes:)
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5114ac_tool_warned=yes ;;
5115esac
5116 CXX=$ac_ct_CXX
5117 fi
5118fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119
5120 if test "$CXX" = "notfound"
5121 then
5122 CXX=""
5123 fi
5124fi
5125if test "$preset_cxx" != "$CXX"
5126then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127 { $as_echo "$as_me:${as_lineno-$LINENO}:
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.
5131 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133
5134 By default, distutils will build C++ extension modules with \"$CXX\".
5135 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005136 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137fi
5138
5139
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5141
5142
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5144$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5145cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef bfin
5147#undef cris
5148#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005149#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef hppa
5151#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005154#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005157#if defined(__ANDROID__)
5158# if defined(__x86_64__) && defined(__LP64__)
5159 x86_64-linux-android
5160# elif defined(__i386__)
5161 i686-linux-android
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-android
5165# else
5166 aarch64-linux-android
5167# endif
5168# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5169 arm-linux-androideabi
5170# elif defined(__mips_hard_float) && defined(_MIPSEL)
5171# if _MIPS_SIM == _ABIO32
5172 mipsel-linux-android
5173# elif _MIPS_SIM == _ABI64
5174 mips64el-linux-android
5175# else
5176# error unknown platform triplet
5177# endif
5178# else
5179# error unknown platform triplet
5180# endif
5181#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182# if defined(__x86_64__) && defined(__LP64__)
5183 x86_64-linux-gnu
5184# elif defined(__x86_64__) && defined(__ILP32__)
5185 x86_64-linux-gnux32
5186# elif defined(__i386__)
5187 i386-linux-gnu
5188# elif defined(__aarch64__) && defined(__AARCH64EL__)
5189# if defined(__ILP32__)
5190 aarch64_ilp32-linux-gnu
5191# else
5192 aarch64-linux-gnu
5193# endif
5194# elif defined(__aarch64__) && defined(__AARCH64EB__)
5195# if defined(__ILP32__)
5196 aarch64_be_ilp32-linux-gnu
5197# else
5198 aarch64_be-linux-gnu
5199# endif
5200# elif defined(__alpha__)
5201 alpha-linux-gnu
5202# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5203# if defined(__ARMEL__)
5204 arm-linux-gnueabihf
5205# else
5206 armeb-linux-gnueabihf
5207# endif
5208# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5209# if defined(__ARMEL__)
5210 arm-linux-gnueabi
5211# else
5212 armeb-linux-gnueabi
5213# endif
5214# elif defined(__hppa__)
5215 hppa-linux-gnu
5216# elif defined(__ia64__)
5217 ia64-linux-gnu
5218# elif defined(__m68k__) && !defined(__mcoldfire__)
5219 m68k-linux-gnu
5220# elif defined(__mips_hard_float) && defined(_MIPSEL)
5221# if _MIPS_SIM == _ABIO32
5222 mipsel-linux-gnu
5223# elif _MIPS_SIM == _ABIN32
5224 mips64el-linux-gnuabin32
5225# elif _MIPS_SIM == _ABI64
5226 mips64el-linux-gnuabi64
5227# else
5228# error unknown platform triplet
5229# endif
5230# elif defined(__mips_hard_float)
5231# if _MIPS_SIM == _ABIO32
5232 mips-linux-gnu
5233# elif _MIPS_SIM == _ABIN32
5234 mips64-linux-gnuabin32
5235# elif _MIPS_SIM == _ABI64
5236 mips64-linux-gnuabi64
5237# else
5238# error unknown platform triplet
5239# endif
5240# elif defined(__or1k__)
5241 or1k-linux-gnu
5242# elif defined(__powerpc__) && defined(__SPE__)
5243 powerpc-linux-gnuspe
5244# elif defined(__powerpc64__)
5245# if defined(__LITTLE_ENDIAN__)
5246 powerpc64le-linux-gnu
5247# else
5248 powerpc64-linux-gnu
5249# endif
5250# elif defined(__powerpc__)
5251 powerpc-linux-gnu
5252# elif defined(__s390x__)
5253 s390x-linux-gnu
5254# elif defined(__s390__)
5255 s390-linux-gnu
5256# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5257 sh4-linux-gnu
5258# elif defined(__sparc__) && defined(__arch64__)
5259 sparc64-linux-gnu
5260# elif defined(__sparc__)
5261 sparc-linux-gnu
5262# else
5263# error unknown platform triplet
5264# endif
5265#elif defined(__FreeBSD_kernel__)
5266# if defined(__LP64__)
5267 x86_64-kfreebsd-gnu
5268# elif defined(__i386__)
5269 i386-kfreebsd-gnu
5270# else
5271# error unknown platform triplet
5272# endif
5273#elif defined(__gnu_hurd__)
5274 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005275#elif defined(__APPLE__)
5276 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#else
5278# error unknown platform triplet
5279#endif
5280
5281EOF
5282
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005283if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005284 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5286$as_echo "$PLATFORM_TRIPLET" >&6; }
5287else
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5289$as_echo "none" >&6; }
5290fi
5291rm -f conftest.c conftest.out
5292
5293if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5294 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5295 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5296 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005297elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5298 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005300if test x$PLATFORM_TRIPLET = x; then
5301 PLATDIR=plat-$MACHDEP
5302else
5303 PLATDIR=plat-$PLATFORM_TRIPLET
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
doko@ubuntu.com55532312016-06-14 08:55:19 +02005307if test x$MULTIARCH != x; then
5308 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5309fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310
5311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5313$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5314save_LDFLAGS="$LDFLAGS"
5315LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5318/* end confdefs.h. */
5319
5320int
5321main ()
5322{
5323
5324 ;
5325 return 0;
5326}
5327_ACEOF
5328if ac_fn_c_try_link "$LINENO"; then :
5329 NO_AS_NEEDED="-Wl,--no-as-needed"
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331$as_echo "yes" >&6; }
5332else
5333 NO_AS_NEEDED=""
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337rm -f core conftest.err conftest.$ac_objext \
5338 conftest$ac_exeext conftest.$ac_ext
5339LDFLAGS="$save_LDFLAGS"
5340
5341
5342
5343# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344
Matthias Kloseb9621712010-04-24 17:59:49 +00005345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5346$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005347if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349else
5350 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5351 then ac_cv_path_EGREP="$GREP -E"
5352 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 # Loop through the user's path and test for each of PROGNAME-LIST
5356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5358do
5359 IFS=$as_save_IFS
5360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 for ac_prog in egrep; do
5362 for ac_exec_ext in '' $ac_executable_extensions; do
5363 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005364 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005365# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366 # Check for GNU $ac_path_EGREP
5367case `"$ac_path_EGREP" --version 2>&1` in
5368*GNU*)
5369 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5370*)
5371 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 while :
5374 do
5375 cat "conftest.in" "conftest.in" >"conftest.tmp"
5376 mv "conftest.tmp" "conftest.in"
5377 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5383 # Best one so far, save it but keep looking for a better one
5384 ac_cv_path_EGREP="$ac_path_EGREP"
5385 ac_path_EGREP_max=$ac_count
5386 fi
5387 # 10*(2^10) chars as input seems more than enough
5388 test $ac_count -gt 10 && break
5389 done
5390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5391esac
5392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $ac_path_EGREP_found && break 3
5394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005399 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 +00005400 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401else
5402 ac_cv_path_EGREP=$EGREP
5403fi
5404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 fi
5406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5408$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005410
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5413$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005414if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $as_echo_n "(cached) " >&6
5416else
5417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005418/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005419#include <stdlib.h>
5420#include <stdarg.h>
5421#include <string.h>
5422#include <float.h>
5423
5424int
5425main ()
5426{
5427
5428 ;
5429 return 0;
5430}
5431_ACEOF
5432if ac_fn_c_try_compile "$LINENO"; then :
5433 ac_cv_header_stdc=yes
5434else
5435 ac_cv_header_stdc=no
5436fi
5437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438
5439if test $ac_cv_header_stdc = yes; then
5440 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5442/* end confdefs.h. */
5443#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005444
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005449else
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005452rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454fi
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <stdlib.h>
5461
5462_ACEOF
5463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5464 $EGREP "free" >/dev/null 2>&1; then :
5465
5466else
5467 ac_cv_header_stdc=no
5468fi
5469rm -f conftest*
5470
5471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5475 if test "$cross_compiling" = yes; then :
5476 :
5477else
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <ctype.h>
5481#include <stdlib.h>
5482#if ((' ' & 0x0FF) == 0x020)
5483# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5484# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5485#else
5486# define ISLOWER(c) \
5487 (('a' <= (c) && (c) <= 'i') \
5488 || ('j' <= (c) && (c) <= 'r') \
5489 || ('s' <= (c) && (c) <= 'z'))
5490# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5491#endif
5492
5493#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5494int
5495main ()
5496{
5497 int i;
5498 for (i = 0; i < 256; i++)
5499 if (XOR (islower (i), ISLOWER (i))
5500 || toupper (i) != TOUPPER (i))
5501 return 2;
5502 return 0;
5503}
5504_ACEOF
5505if ac_fn_c_try_run "$LINENO"; then :
5506
5507else
5508 ac_cv_header_stdc=no
5509fi
5510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5511 conftest.$ac_objext conftest.beam conftest.$ac_ext
5512fi
5513
5514fi
5515fi
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5517$as_echo "$ac_cv_header_stdc" >&6; }
5518if test $ac_cv_header_stdc = yes; then
5519
5520$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5521
5522fi
5523
5524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5526 inttypes.h stdint.h unistd.h
5527do :
5528 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5529ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5530"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005531if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 cat >>confdefs.h <<_ACEOF
5533#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5534_ACEOF
5535
5536fi
5537
5538done
5539
5540
5541
5542 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 +02005543if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 MINIX=yes
5545else
5546 MINIX=
5547fi
5548
5549
5550 if test "$MINIX" = yes; then
5551
5552$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5553
5554
5555$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5556
5557
5558$as_echo "#define _MINIX 1" >>confdefs.h
5559
5560 fi
5561
5562
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5564$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005565if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 $as_echo_n "(cached) " >&6
5567else
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569/* end confdefs.h. */
5570
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005571# define __EXTENSIONS__ 1
5572 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005573int
5574main ()
5575{
5576
5577 ;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_compile "$LINENO"; then :
5582 ac_cv_safe_to_define___extensions__=yes
5583else
5584 ac_cv_safe_to_define___extensions__=no
5585fi
5586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5587fi
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5589$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5590 test $ac_cv_safe_to_define___extensions__ = yes &&
5591 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5592
5593 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5594
5595 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5596
5597 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5598
5599 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5600
5601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
Xavier de Gaye95750b12016-07-09 11:05:42 +02005603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5604$as_echo_n "checking for the Android API level... " >&6; }
5605cat >> conftest.c <<EOF
5606#ifdef __ANDROID__
5607#include <android/api-level.h>
5608__ANDROID_API__
5609#else
5610#error not Android
5611#endif
5612EOF
5613
5614if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5615 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5617$as_echo "$ANDROID_API_LEVEL" >&6; }
5618
5619cat >>confdefs.h <<_ACEOF
5620#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5621_ACEOF
5622
5623else
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5625$as_echo "not Android" >&6; }
5626fi
5627rm -f conftest.c conftest.out
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629# Check for unsupported systems
5630case $ac_sys_system/$ac_sys_release in
5631atheos*|Linux*/1*)
5632 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5633 echo See README for details.
5634 exit 1;;
5635esac
5636
5637
Matthias Kloseb9621712010-04-24 17:59:49 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5639$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
5641# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 withval=$with_suffix;
5644 case $withval in
5645 no) EXEEXT=;;
5646 yes) EXEEXT=.exe;;
5647 *) EXEEXT=$withval;;
5648 esac
5649fi
5650
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5652$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
5654# Test whether we're running on a non-case-sensitive system, in which
5655# case we give a warning if no ext is given
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5658$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659if test ! -d CaseSensitiveTestDir; then
5660mkdir CaseSensitiveTestDir
5661fi
5662
5663if test -d casesensitivetestdir
5664then
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5666$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 BUILDEXEEXT=.exe
5668else
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 BUILDEXEEXT=$EXEEXT
5672fi
5673rmdir CaseSensitiveTestDir
5674
5675case $MACHDEP in
5676bsdos*)
5677 case $CC in
5678 gcc) CC="$CC -D_HAVE_BSDI";;
5679 esac;;
5680esac
5681
5682case $ac_sys_system in
5683hp*|HP*)
5684 case $CC in
5685 cc|*/cc) CC="$CC -Ae";;
5686 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687esac
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692if test -z "$LIBRARY"
5693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# LDLIBRARY is the name of the library to link against (as opposed to the
5700# name of the library into which to insert object files). BLDLIBRARY is also
5701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5702# is blank as the main program is not linked directly against LDLIBRARY.
5703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5706# DLLLIBRARY is the shared (i.e., DLL) library.
5707#
5708# RUNSHARED is used to run shared python without installed libraries
5709#
5710# INSTSONAME is the name of the shared library that will be use to install
5711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005712#
5713# LDVERSION is the shared library version number, normally the Python version
5714# with the ABI build flags appended.
5715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717
5718
5719
5720
5721
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723LDLIBRARY="$LIBRARY"
5724BLDLIBRARY='$(LDLIBRARY)'
5725INSTSONAME='$(LDLIBRARY)'
5726DLLLIBRARY=''
5727LDLIBRARYDIR=''
5728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# LINKCC is the command that links the python executable -- default is $(CC).
5732# If CXX is set, and if it is needed to link a main function that was
5733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5734# python might then depend on the C++ runtime
5735# This is altered for AIX in order to build the export list before
5736# linking.
5737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LINKCC"
5741then
5742 LINKCC='$(PURIFY) $(MAINCC)'
5743 case $ac_sys_system in
5744 AIX*)
5745 exp_extra="\"\""
5746 if test $ac_sys_release -ge 5 -o \
5747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5748 exp_extra="."
5749 fi
5750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 QNX*)
5752 # qcc must be used because the other compilers do not
5753 # support -N.
5754 LINKCC=qcc;;
5755 esac
5756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5761# make sure we default having it set to "no": this is used by
5762# distutils.unixccompiler to know if it should add --enable-new-dtags
5763# to linker command lines, and failing to detect GNU ld simply results
5764# in the same bahaviour as before.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768ac_prog=ld
5769if test "$GCC" = yes; then
5770 ac_prog=`$CC -print-prog-name=ld`
5771fi
5772case `"$ac_prog" -V 2>&1 < /dev/null` in
5773 *GNU*)
5774 GNULD=yes;;
5775 *)
5776 GNULD=no;;
5777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5782$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005784 $as_echo_n "(cached) " >&6
5785else
5786 ac_cv_c_inline=no
5787for ac_kw in inline __inline__ __inline; do
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790#ifndef __cplusplus
5791typedef int foo_t;
5792static $ac_kw foo_t static_foo () {return 0; }
5793$ac_kw foo_t foo () {return 0; }
5794#endif
5795
5796_ACEOF
5797if ac_fn_c_try_compile "$LINENO"; then :
5798 ac_cv_c_inline=$ac_kw
5799fi
5800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5801 test "$ac_cv_c_inline" != no && break
5802done
5803
5804fi
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5806$as_echo "$ac_cv_c_inline" >&6; }
5807
5808case $ac_cv_c_inline in
5809 inline | yes) ;;
5810 *)
5811 case $ac_cv_c_inline in
5812 no) ac_val=;;
5813 *) ac_val=$ac_cv_c_inline;;
5814 esac
5815 cat >>confdefs.h <<_ACEOF
5816#ifndef __cplusplus
5817#define inline $ac_val
5818#endif
5819_ACEOF
5820 ;;
5821esac
5822
5823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005824
5825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005826
5827
5828fi
5829
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 enableval=$enable_shared;
5836fi
5837
5838
5839if test -z "$enable_shared"
5840then
5841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 enable_shared="yes";;
5844 *)
5845 enable_shared="no";;
5846 esac
5847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855 enableval=$enable_profiling;
5856fi
5857
5858if test "x$enable_profiling" = xyes; then
5859 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862/* end confdefs.h. */
5863int main() { return 0; }
5864_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865if ac_fn_c_try_link "$LINENO"; then :
5866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870rm -f core conftest.err conftest.$ac_objext \
5871 conftest$ac_exeext conftest.$ac_ext
5872 CC="$ac_save_cc"
5873else
5874 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5877$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879if test "x$enable_profiling" = xyes; then
5880 BASECFLAGS="-pg $BASECFLAGS"
5881 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5885$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5888# library that we build, but we do not want to link against it (we
5889# will find it with a -framework option). For this reason there is an
5890# extra variable BLDLIBRARY against which Python and the extension
5891# modules are linked, BLDLIBRARY. This is normally the same as
5892# LDLIBRARY, but empty for MacOSX framework builds.
5893if test "$enable_framework"
5894then
5895 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 BLDLIBRARY=''
5898else
5899 BLDLIBRARY='$(LDLIBRARY)'
5900fi
5901
5902# Other platforms follow
5903if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005904 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 case $ac_sys_system in
5909 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dll.a'
5911 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
5915 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005918 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005919 then
5920 PY3LIBRARY=libpython3.so
5921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 hp*|HP*)
5934 case `uname -m` in
5935 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).dylib'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
5955 esac
5956else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005957 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 case $ac_sys_system in
5959 CYGWIN*)
5960 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
5964fi
5965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005966if test "$cross_compiling" = yes; then
5967 RUNSHARED=
5968fi
5969
Matthias Kloseb9621712010-04-24 17:59:49 +00005970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5971$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972
5973if test -n "$ac_tool_prefix"; then
5974 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5975set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005978if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
5981 if test -n "$RANLIB"; then
5982 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 break 2
5994 fi
5995done
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997IFS=$as_save_IFS
5998
5999fi
6000fi
6001RANLIB=$ac_cv_prog_RANLIB
6002if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6004$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005else
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008fi
6009
6010
6011fi
6012if test -z "$ac_cv_prog_RANLIB"; then
6013 ac_ct_RANLIB=$RANLIB
6014 # Extract the first word of "ranlib", so it can be a program name with args.
6015set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006018if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020else
6021 if test -n "$ac_ct_RANLIB"; then
6022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6023else
6024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 break 2
6034 fi
6035done
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037IFS=$as_save_IFS
6038
6039fi
6040fi
6041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6042if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6044$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
6050 if test "x$ac_ct_RANLIB" = x; then
6051 RANLIB=":"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057ac_tool_warned=yes ;;
6058esac
6059 RANLIB=$ac_ct_RANLIB
6060 fi
6061else
6062 RANLIB="$ac_cv_prog_RANLIB"
6063fi
6064
6065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006066if test -n "$ac_tool_prefix"; then
6067 for ac_prog in ar aal
6068 do
6069 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006073if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
6076 if test -n "$AR"; then
6077 ac_cv_prog_AR="$AR" # Let the user override the test.
6078else
6079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006086 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 break 2
6089 fi
6090done
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092IFS=$as_save_IFS
6093
6094fi
6095fi
6096AR=$ac_cv_prog_AR
6097if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6099$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100else
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103fi
6104
6105
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006106 test -n "$AR" && break
6107 done
6108fi
6109if test -z "$AR"; then
6110 ac_ct_AR=$AR
6111 for ac_prog in ar aal
6112do
6113 # Extract the first word of "$ac_prog", so it can be a program name with args.
6114set dummy $ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_ac_ct_AR+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$ac_ct_AR"; then
6121 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 ac_cv_prog_ac_ct_AR="$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_AR=$ac_cv_prog_ac_ct_AR
6141if test -n "$ac_ct_AR"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6143$as_echo "$ac_ct_AR" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$ac_ct_AR" && break
6151done
6152
6153 if test "x$ac_ct_AR" = x; then
6154 AR="ar"
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 AR=$ac_ct_AR
6163 fi
6164fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165
6166
6167# tweak ARFLAGS only if the user didn't set it on the command line
6168
6169if test -z "$ARFLAGS"
6170then
6171 ARFLAGS="rc"
6172fi
6173
doko@ubuntu.com58844492012-06-30 18:25:32 +02006174if test -n "$ac_tool_prefix"; then
6175 for ac_prog in readelf
6176 do
6177 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_prog_READELF+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183else
6184 if test -n "$READELF"; then
6185 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6186else
6187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
6192 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006194 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196 break 2
6197 fi
6198done
6199 done
6200IFS=$as_save_IFS
6201
6202fi
6203fi
6204READELF=$ac_cv_prog_READELF
6205if test -n "$READELF"; then
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6207$as_echo "$READELF" >&6; }
6208else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
6211fi
6212
6213
6214 test -n "$READELF" && break
6215 done
6216fi
6217if test -z "$READELF"; then
6218 ac_ct_READELF=$READELF
6219 for ac_prog in readelf
6220do
6221 # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227else
6228 if test -n "$ac_ct_READELF"; then
6229 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6230else
6231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
6236 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006238 ac_cv_prog_ac_ct_READELF="$ac_prog"
6239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240 break 2
6241 fi
6242done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247fi
6248ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6249if test -n "$ac_ct_READELF"; then
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6251$as_echo "$ac_ct_READELF" >&6; }
6252else
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258 test -n "$ac_ct_READELF" && break
6259done
6260
6261 if test "x$ac_ct_READELF" = x; then
6262 READELF=":"
6263 else
6264 case $cross_compiling:$ac_tool_warned in
6265yes:)
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268ac_tool_warned=yes ;;
6269esac
6270 READELF=$ac_ct_READELF
6271 fi
6272fi
6273
6274if test "$cross_compiling" = yes; then
6275 case "$READELF" in
6276 readelf|:)
6277 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6278 ;;
6279 esac
6280fi
6281
6282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284case $MACHDEP in
6285bsdos*|hp*|HP*)
6286 # install -d does not work on BSDI or HP-UX
6287 if test -z "$INSTALL"
6288 then
6289 INSTALL="${srcdir}/install-sh -c"
6290 fi
6291esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292# Find a good install program. We prefer a C program (faster),
6293# so one script is as good as another. But avoid the broken or
6294# incompatible versions:
6295# SysV /etc/install, /usr/sbin/install
6296# SunOS /usr/etc/install
6297# IRIX /sbin/install
6298# AIX /bin/install
6299# AmigaOS /C/install, which installs bootblocks on floppy discs
6300# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6301# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6302# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6303# OS/2's system install, which has a completely different semantic
6304# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006305# Reject install programs that cannot install multiple files.
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6307$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006309if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311else
6312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 # Account for people who put trailing slashes in PATH elements.
6318case $as_dir/ in #((
6319 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 /usr/ucb/* ) ;;
6323 *)
6324 # OSF1 and SCO ODT 3.0 have their own names for install.
6325 # Don't use installbsd from OSF since it installs stuff as root
6326 # by default.
6327 for ac_prog in ginstall scoinst install; do
6328 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006329 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 if test $ac_prog = install &&
6331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6332 # AIX install. It has an incompatible calling convention.
6333 :
6334 elif test $ac_prog = install &&
6335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6336 # program-specific install script used by HP pwplus--don't use.
6337 :
6338 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 rm -rf conftest.one conftest.two conftest.dir
6340 echo one > conftest.one
6341 echo two > conftest.two
6342 mkdir conftest.dir
6343 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6344 test -s conftest.one && test -s conftest.two &&
6345 test -s conftest.dir/conftest.one &&
6346 test -s conftest.dir/conftest.two
6347 then
6348 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6349 break 3
6350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351 fi
6352 fi
6353 done
6354 done
6355 ;;
6356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006357
6358 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359IFS=$as_save_IFS
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362
6363fi
6364 if test "${ac_cv_path_install+set}" = set; then
6365 INSTALL=$ac_cv_path_install
6366 else
6367 # As a last resort, use the slow shell script. Don't cache a
6368 # value for INSTALL within a source directory, because that will
6369 # break other packages using the cache if that directory is
6370 # removed, or if the value is a relative name.
6371 INSTALL=$ac_install_sh
6372 fi
6373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6375$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6378# It thinks the first close brace ends the variable substitution.
6379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6380
6381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6382
6383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6384
Matthias Klose93a0ef12012-03-15 18:08:34 +01006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6386$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6387if test -z "$MKDIR_P"; then
6388 if ${ac_cv_path_mkdir+:} false; then :
6389 $as_echo_n "(cached) " >&6
6390else
6391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6393do
6394 IFS=$as_save_IFS
6395 test -z "$as_dir" && as_dir=.
6396 for ac_prog in mkdir gmkdir; do
6397 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006398 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006399 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6400 'mkdir (GNU coreutils) '* | \
6401 'mkdir (coreutils) '* | \
6402 'mkdir (fileutils) '4.1*)
6403 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6404 break 3;;
6405 esac
6406 done
6407 done
6408 done
6409IFS=$as_save_IFS
6410
6411fi
6412
6413 test -d ./--version && rmdir ./--version
6414 if test "${ac_cv_path_mkdir+set}" = set; then
6415 MKDIR_P="$ac_cv_path_mkdir -p"
6416 else
6417 # As a last resort, use the slow shell script. Don't cache a
6418 # value for MKDIR_P within a source directory, because that will
6419 # break other packages using the cache if that directory is
6420 # removed, or if the value is a relative name.
6421 MKDIR_P="$ac_install_sh -d"
6422 fi
6423fi
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6425$as_echo "$MKDIR_P" >&6; }
6426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428# Not every filesystem supports hard links
6429
6430if test -z "$LN" ; then
6431 case $ac_sys_system in
6432 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 *) LN=ln;;
6434 esac
6435fi
6436
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006437# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006438
6439ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6443$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006446if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 withval=$with_pydebug;
6448if test "$withval" != no
6449then
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006456 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006457else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459fi
6460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463fi
6464
6465
Brett Cannon63d98bc2016-09-06 17:12:40 -07006466# Enable optimization flags
6467
6468
6469Py_OPT='false'
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6471$as_echo_n "checking for --with-optimizations... " >&6; }
6472
6473# Check whether --with-optimizations was given.
6474if test "${with_optimizations+set}" = set; then :
6475 withval=$with_optimizations;
6476if test "$withval" != no
6477then
6478 Py_OPT='true'
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
6481else
6482 Py_OPT='false'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
6485fi
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491if test "$Py_OPT" = 'true' ; then
6492 Py_LTO='true'
6493 case $ac_sys_system in
6494 Darwin*)
6495 # At least on macOS El Capitan, LTO does not work with PGO.
6496 Py_LTO='false'
6497 ;;
6498 esac
6499 DEF_MAKE_ALL_RULE="profile-opt"
6500 DEF_MAKE_RULE="build_all"
6501else
6502 DEF_MAKE_ALL_RULE="build_all"
6503 DEF_MAKE_RULE="all"
6504fi
6505
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006506# Enable LTO flags
6507
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6509$as_echo_n "checking for --with-lto... " >&6; }
6510
6511# Check whether --with-lto was given.
6512if test "${with_lto+set}" = set; then :
6513 withval=$with_lto;
6514if test "$withval" != no
6515then
6516 Py_LTO='true'
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6518$as_echo "yes" >&6; };
6519else
6520 Py_LTO='false'
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; };
6523fi
6524else
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529if test "$Py_LTO" = 'true' ; then
6530 case $CC in
6531 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006532 case $ac_sys_system in
6533 Darwin*)
6534 # Any changes made here should be reflected in the GCC+Darwin case below
6535 LTOFLAGS="-flto -Wl,-export_dynamic"
6536 ;;
6537 *)
6538 LTOFLAGS="-flto"
6539 ;;
6540 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006541 ;;
6542 *gcc*)
6543 case $ac_sys_system in
6544 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006545 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006546 ;;
6547 *)
6548 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6549 ;;
6550 esac
6551 ;;
6552 esac
6553fi
6554
Brett Cannon7188a3e2015-09-18 15:13:44 -07006555# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006556
6557
6558
6559
6560
6561
Brett Cannon7188a3e2015-09-18 15:13:44 -07006562# Extract the first word of "llvm-profdata", so it can be a program name with args.
6563set dummy llvm-profdata; ac_word=$2
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565$as_echo_n "checking for $ac_word... " >&6; }
6566if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 if test -n "$LLVM_PROF_FOUND"; then
6570 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6571else
6572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6573for as_dir in $PATH
6574do
6575 IFS=$as_save_IFS
6576 test -z "$as_dir" && as_dir=.
6577 for ac_exec_ext in '' $ac_executable_extensions; do
6578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6579 ac_cv_prog_LLVM_PROF_FOUND="found"
6580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6581 break 2
6582 fi
6583done
6584 done
6585IFS=$as_save_IFS
6586
6587 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6588fi
6589fi
6590LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6591if test -n "$LLVM_PROF_FOUND"; then
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6593$as_echo "$LLVM_PROF_FOUND" >&6; }
6594else
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596$as_echo "no" >&6; }
6597fi
6598
6599
6600LLVM_PROF_ERR=no
6601case $CC in
6602 *clang*)
6603 # Any changes made here should be reflected in the GCC+Darwin case below
6604 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6605 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6606 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6607 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6608 if test $LLVM_PROF_FOUND = not-found
6609 then
6610 LLVM_PROF_ERR=yes
6611 fi
6612 ;;
6613 *gcc*)
6614 case $ac_sys_system in
6615 Darwin*)
6616 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6617 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6618 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6619 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6620 if test $LLVM_PROF_FOUND = not-found
6621 then
6622 LLVM_PROF_ERR=yes
6623 fi
6624 ;;
6625 *)
6626 PGO_PROF_GEN_FLAG="-fprofile-generate"
6627 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6628 LLVM_PROF_MERGER="true"
6629 LLVM_PROF_FILE=""
6630 ;;
6631 esac
6632 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006633 *icc*)
6634 PGO_PROF_GEN_FLAG="-prof-gen"
6635 PGO_PROF_USE_FLAG="-prof-use"
6636 LLVM_PROF_MERGER="true"
6637 LLVM_PROF_FILE=""
6638 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006639esac
6640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6642# merged with this chunk of code?
6643
6644# Optimizer/debugger flags
6645# ------------------------
6646# (The following bit of code is complicated enough - please keep things
6647# indented properly. Just pretend you're editing Python code. ;-)
6648
6649# There are two parallel sets of case statements below, one that checks to
6650# see if OPT was set and one that does BASECFLAGS setting based upon
6651# compiler and platform. BASECFLAGS tweaks need to be made even if the
6652# user set OPT.
6653
6654# tweak OPT based on compiler and platform, only if the user didn't set
6655# it on the command line
6656
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006657if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658then
6659 case $GCC in
6660 yes)
6661 if test "$CC" != 'g++' ; then
6662 STRICT_PROTO="-Wstrict-prototypes"
6663 fi
6664 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6665 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6666 WRAP="-fwrapv"
6667 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006668
6669 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006670 case $CC in
6671 *clang*) WRAP="-fwrapv"
6672 ;;
6673 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675 case $ac_cv_prog_cc_g in
6676 yes)
6677 if test "$Py_DEBUG" = 'true' ; then
6678 # Optimization messes up debuggers, so turn it off for
6679 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006680 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6681 OPT="-g -Og -Wall $STRICT_PROTO"
6682 else
6683 OPT="-g -O0 -Wall $STRICT_PROTO"
6684 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685 else
6686 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6687 fi
6688 ;;
6689 *)
6690 OPT="-O3 -Wall $STRICT_PROTO"
6691 ;;
6692 esac
6693 case $ac_sys_system in
6694 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6695 ;;
6696 esac
6697 ;;
6698
6699 *)
6700 OPT="-O"
6701 ;;
6702 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703fi
6704
6705
6706
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708# The -arch flags for universal builds on OSX
6709UNIVERSAL_ARCH_FLAGS=
6710
6711
6712# tweak BASECFLAGS based on compiler and platform
6713case $GCC in
6714yes)
Benjamin Petersond1702562016-09-07 12:00:06 -07006715 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
6716
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006717 # Python doesn't violate C99 aliasing rules, but older versions of
6718 # GCC produce warnings for legal Python code. Enable
6719 # -fno-strict-aliasing on versions of GCC that support but produce
6720 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6722$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723 ac_save_cc="$CC"
6724 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006725 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006726 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006731
Matthias Kloseb159a552010-04-25 21:00:44 +00006732
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006733int
6734main ()
6735{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006736
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006737 ;
6738 return 0;
6739}
Matthias Kloseb159a552010-04-25 21:00:44 +00006740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006742if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006743
6744 CC="$ac_save_cc -fstrict-aliasing"
6745 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006747/* end confdefs.h. */
6748
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006749 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006750int
6751main ()
6752{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006753double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006754 ;
6755 return 0;
6756}
Matthias Kloseb159a552010-04-25 21:00:44 +00006757
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006759if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006760
6761 ac_cv_no_strict_aliasing=no
6762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763else
Matthias Kloseb159a552010-04-25 21:00:44 +00006764
6765 ac_cv_no_strict_aliasing=yes
6766
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006767fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006769
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006770else
Matthias Kloseb159a552010-04-25 21:00:44 +00006771
6772 ac_cv_no_strict_aliasing=no
6773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006774fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006776fi
6777
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006778 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6781$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006782 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783 then
6784 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6785 fi
6786
Zachary Ware5af85642015-12-21 12:09:17 -06006787 # ICC doesn't recognize the option, but only emits a warning
6788 ## XXX does it emit an unused result warning and can it be disabled?
6789 case "$CC" in
6790 *icc*)
6791 ac_cv_disable_unused_result_warning=no
6792 ;;
6793 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6795$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6796 ac_save_cc="$CC"
6797 CC="$CC -Wunused-result -Werror"
6798 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006799 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006800 $as_echo_n "(cached) " >&6
6801else
6802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6803/* end confdefs.h. */
6804
6805
6806int
6807main ()
6808{
6809
6810 ;
6811 return 0;
6812}
6813
6814_ACEOF
6815if ac_fn_c_try_compile "$LINENO"; then :
6816
6817 ac_cv_disable_unused_result_warning=yes
6818
6819else
6820
6821 ac_cv_disable_unused_result_warning=no
6822
6823fi
6824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6825fi
6826
6827 CFLAGS="$save_CFLAGS"
6828 CC="$ac_save_cc"
6829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6830$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006831 ;;
6832 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006833
6834 if test $ac_cv_disable_unused_result_warning = yes
6835 then
6836 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6837 fi
6838
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6840$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6841 ac_save_cc="$CC"
6842 CC="$CC -Wsign-compare"
6843 save_CFLAGS="$CFLAGS"
6844 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6845 $as_echo_n "(cached) " >&6
6846else
6847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6848/* end confdefs.h. */
6849
6850
6851int
6852main ()
6853{
6854
6855 ;
6856 return 0;
6857}
6858
6859_ACEOF
6860if ac_fn_c_try_compile "$LINENO"; then :
6861
6862 ac_cv_enable_sign_compare_warning=yes
6863
6864else
6865
6866 ac_cv_enable_sign_compare_warning=no
6867
6868fi
6869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6870fi
6871
6872 CFLAGS="$save_CFLAGS"
6873 CC="$ac_save_cc"
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6875$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6876
6877 if test $ac_cv_enable_sign_compare_warning = yes
6878 then
6879 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6880 fi
6881
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6883$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6884 ac_save_cc="$CC"
6885 CC="$CC -Wunreachable-code"
6886 save_CFLAGS="$CFLAGS"
6887 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6888 $as_echo_n "(cached) " >&6
6889else
6890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6891/* end confdefs.h. */
6892
6893
6894int
6895main ()
6896{
6897
6898 ;
6899 return 0;
6900}
6901
6902_ACEOF
6903if ac_fn_c_try_compile "$LINENO"; then :
6904
6905 ac_cv_enable_unreachable_code_warning=yes
6906
6907else
6908
6909 ac_cv_enable_unreachable_code_warning=no
6910
6911fi
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6913fi
6914
6915 CFLAGS="$save_CFLAGS"
6916 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006917
6918 # Don't enable unreachable code warning in debug mode, since it usually
6919 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006920 # Issue #24324: Unfortunately, the unreachable code warning does not work
6921 # correctly on gcc and has been silently removed from the compiler.
6922 # It is supported on clang but on OS X systems gcc may be an alias
6923 # for clang. Try to determine if the compiler is not really gcc and,
6924 # if so, only then enable the warning.
6925 if test $ac_cv_enable_unreachable_code_warning = yes && \
6926 test "$Py_DEBUG" != "true" && \
6927 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006928 then
6929 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006930 else
6931 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006932 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6934$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6937 # support. Without this, treatment of subnormals doesn't follow
6938 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006939 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940 alpha*)
6941 BASECFLAGS="$BASECFLAGS -mieee"
6942 ;;
6943 esac
6944
6945 case $ac_sys_system in
6946 SCO_SV*)
6947 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6948 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006949
6950 # is there any other compiler on Darwin besides gcc?
6951 Darwin*)
6952 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6953 # used to be here, but non-Apple gcc doesn't accept them.
6954 if test "${CC}" = gcc
6955 then
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006957$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006958 case "${UNIVERSALSDK}" in
6959 */MacOSX10.4u.sdk)
6960 # Build using 10.4 SDK, force usage of gcc when the
6961 # compiler is gcc, otherwise the user will get very
6962 # confusing error messages when building on OSX 10.6
6963 CC=gcc-4.0
6964 CPP=cpp-4.0
6965 ;;
6966 esac
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006968$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006969 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970
Ned Deily87adb6e2013-10-18 21:09:56 -07006971 if test "${enable_universalsdk}"
6972 then
6973 case "$UNIVERSAL_ARCHS" in
6974 32-bit)
6975 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6976 LIPO_32BIT_FLAGS=""
6977 ARCH_RUN_32BIT=""
6978 ;;
6979 64-bit)
6980 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6981 LIPO_32BIT_FLAGS=""
6982 ARCH_RUN_32BIT="true"
6983 ;;
6984 all)
6985 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6986 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6987 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6988 ;;
6989 intel)
6990 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6991 LIPO_32BIT_FLAGS="-extract i386"
6992 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6993 ;;
6994 intel-32)
6995 UNIVERSAL_ARCH_FLAGS="-arch i386"
6996 LIPO_32BIT_FLAGS=""
6997 ARCH_RUN_32BIT=""
6998 ;;
6999 3-way)
7000 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7001 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7002 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7003 ;;
7004 *)
7005 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7006 ;;
7007 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008
Ned Deily87adb6e2013-10-18 21:09:56 -07007009 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7010 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7011 if test "${UNIVERSALSDK}" != "/"
7012 then
7013 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7014 fi
7015 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007016
Ned Deily87adb6e2013-10-18 21:09:56 -07007017 # Calculate an appropriate deployment target for this build:
7018 # The deployment target value is used explicitly to enable certain
7019 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007020 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007021 # component of the string returned by distutils.get_platform().
7022 #
7023 # Use the value from:
7024 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7025 # 2. the operating system version of the build machine if >= 10.6
7026 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7027 # below to pick either 10.3, 10.4, or 10.5 as the target.
7028 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007029
Ned Deily87adb6e2013-10-18 21:09:56 -07007030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7031$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007032 cur_target_major=`sw_vers -productVersion | \
7033 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7034 cur_target_minor=`sw_vers -productVersion | \
7035 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7036 cur_target="${cur_target_major}.${cur_target_minor}"
7037 if test ${cur_target_major} -eq 10 && \
7038 test ${cur_target_minor} -ge 3 && \
7039 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007040 then
Ned Deily36820b62014-06-25 13:44:22 -07007041 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007042 cur_target=10.3
7043 if test ${enable_universalsdk}
7044 then
7045 case "$UNIVERSAL_ARCHS" in
7046 all|3-way|intel|64-bit)
7047 # These configurations were first supported in 10.5
7048 cur_target='10.5'
7049 ;;
7050 esac
7051 else
7052 if test `/usr/bin/arch` = "i386"
7053 then
7054 # 10.4 was the first release to support Intel archs
7055 cur_target="10.4"
7056 fi
7057 fi
7058 fi
7059 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007060
Ned Deily87adb6e2013-10-18 21:09:56 -07007061 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7062 # environment with a value that is the same as what we'll use
7063 # in the Makefile to ensure that we'll get the same compiler
7064 # environment during configure and build time.
7065 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7066 export MACOSX_DEPLOYMENT_TARGET
7067 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7069$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007070
Ned Deily87adb6e2013-10-18 21:09:56 -07007071 # end of Darwin* tests
7072 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 esac
7074 ;;
7075
7076*)
7077 case $ac_sys_system in
7078 OpenUNIX*|UnixWare*)
7079 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7080 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081 SCO_SV*)
7082 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7083 ;;
7084 esac
7085 ;;
7086esac
7087
Zachary Ware5af85642015-12-21 12:09:17 -06007088# ICC needs -fp-model strict or floats behave badly
7089case "$CC" in
7090*icc*)
7091 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7092 ;;
7093esac
7094
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095if test "$Py_DEBUG" = 'true'; then
7096 :
7097else
7098 OPT="-DNDEBUG $OPT"
7099fi
7100
7101if test "$ac_arch_flags"
7102then
7103 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7104fi
7105
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007106# On some compilers, pthreads are available without further options
7107# (e.g. MacOS X). On some of these systems, the compiler will not
7108# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7109# So we have to see first whether pthreads are available without
7110# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7112$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007113if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115else
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007117 ac_cv_pthread_is_default=no
7118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007120/* end confdefs.h. */
7121
Stefan Krah7dba5942012-11-22 22:49:11 +01007122#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123#include <pthread.h>
7124
7125void* routine(void* p){return NULL;}
7126
7127int main(){
7128 pthread_t p;
7129 if(pthread_create(&p,NULL,routine,NULL)!=0)
7130 return 1;
7131 (void)pthread_detach(p);
7132 return 0;
7133}
7134
7135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007136if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007137
7138 ac_cv_pthread_is_default=yes
7139 ac_cv_kthread=no
7140 ac_cv_pthread=no
7141
7142else
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007147fi
7148
7149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007150fi
7151
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7153$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007154
7155
7156if test $ac_cv_pthread_is_default = yes
7157then
7158 ac_cv_kpthread=no
7159else
7160# -Kpthread, if available, provides the right #defines
7161# and linker options to make pthread_create available
7162# Some compilers won't report that they do not support -Kpthread,
7163# so we need to run a program to see whether it really made the
7164# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7166$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007167if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007169else
7170 ac_save_cc="$CC"
7171CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007172if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007173 ac_cv_kpthread=no
7174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007176/* end confdefs.h. */
7177
Stefan Krah7dba5942012-11-22 22:49:11 +01007178#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007179#include <pthread.h>
7180
7181void* routine(void* p){return NULL;}
7182
7183int main(){
7184 pthread_t p;
7185 if(pthread_create(&p,NULL,routine,NULL)!=0)
7186 return 1;
7187 (void)pthread_detach(p);
7188 return 0;
7189}
7190
7191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007192if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007193 ac_cv_kpthread=yes
7194else
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199fi
7200
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201CC="$ac_save_cc"
7202fi
7203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7205$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007206fi
7207
7208if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7209then
7210# -Kthread, if available, provides the right #defines
7211# and linker options to make pthread_create available
7212# Some compilers won't report that they do not support -Kthread,
7213# so we need to run a program to see whether it really made the
7214# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7216$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007217if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007218 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007219else
7220 ac_save_cc="$CC"
7221CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007222if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223 ac_cv_kthread=no
7224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007226/* end confdefs.h. */
7227
Stefan Krah7dba5942012-11-22 22:49:11 +01007228#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007229#include <pthread.h>
7230
7231void* routine(void* p){return NULL;}
7232
7233int main(){
7234 pthread_t p;
7235 if(pthread_create(&p,NULL,routine,NULL)!=0)
7236 return 1;
7237 (void)pthread_detach(p);
7238 return 0;
7239}
7240
7241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007242if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243 ac_cv_kthread=yes
7244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7248 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249fi
7250
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251CC="$ac_save_cc"
7252fi
7253
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7255$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007256fi
7257
7258if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7259then
7260# -pthread, if available, provides the right #defines
7261# and linker options to make pthread_create available
7262# Some compilers won't report that they do not support -pthread,
7263# so we need to run a program to see whether it really made the
7264# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7266$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007267if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269else
7270 ac_save_cc="$CC"
7271CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007272if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007273 ac_cv_pthread=no
7274else
Matthias Kloseb9621712010-04-24 17:59:49 +00007275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007276/* end confdefs.h. */
7277
Stefan Krah7dba5942012-11-22 22:49:11 +01007278#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007279#include <pthread.h>
7280
7281void* routine(void* p){return NULL;}
7282
7283int main(){
7284 pthread_t p;
7285 if(pthread_create(&p,NULL,routine,NULL)!=0)
7286 return 1;
7287 (void)pthread_detach(p);
7288 return 0;
7289}
7290
7291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007292if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293 ac_cv_pthread=yes
7294else
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7298 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299fi
7300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301CC="$ac_save_cc"
7302fi
7303
Matthias Kloseb9621712010-04-24 17:59:49 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7305$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007306fi
7307
7308# If we have set a CC compiler flag for thread support then
7309# check if it works for CXX, too.
7310ac_cv_cxx_thread=no
7311if test ! -z "$CXX"
7312then
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7314$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315ac_save_cxx="$CXX"
7316
7317if test "$ac_cv_kpthread" = "yes"
7318then
7319 CXX="$CXX -Kpthread"
7320 ac_cv_cxx_thread=yes
7321elif test "$ac_cv_kthread" = "yes"
7322then
7323 CXX="$CXX -Kthread"
7324 ac_cv_cxx_thread=yes
7325elif test "$ac_cv_pthread" = "yes"
7326then
7327 CXX="$CXX -pthread"
7328 ac_cv_cxx_thread=yes
7329fi
7330
7331if test $ac_cv_cxx_thread = yes
7332then
7333 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7334 $CXX -c conftest.$ac_ext 2>&5
7335 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7336 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7337 then
7338 ac_cv_cxx_thread=yes
7339 else
7340 ac_cv_cxx_thread=no
7341 fi
7342 rm -fr conftest*
7343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7345$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346fi
7347CXX="$ac_save_cxx"
7348
7349
7350# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7352$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007353if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355else
Matthias Kloseb9621712010-04-24 17:59:49 +00007356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007357/* end confdefs.h. */
7358#include <stdlib.h>
7359#include <stdarg.h>
7360#include <string.h>
7361#include <float.h>
7362
7363int
7364main ()
7365{
7366
7367 ;
7368 return 0;
7369}
7370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007371if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372 ac_cv_header_stdc=yes
7373else
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377
7378if test $ac_cv_header_stdc = yes; then
7379 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381/* end confdefs.h. */
7382#include <string.h>
7383
7384_ACEOF
7385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 $EGREP "memchr" >/dev/null 2>&1; then :
7387
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388else
7389 ac_cv_header_stdc=no
7390fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007391rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392
7393fi
7394
7395if test $ac_cv_header_stdc = yes; then
7396 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398/* end confdefs.h. */
7399#include <stdlib.h>
7400
7401_ACEOF
7402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 $EGREP "free" >/dev/null 2>&1; then :
7404
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405else
7406 ac_cv_header_stdc=no
7407fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007408rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007409
7410fi
7411
7412if test $ac_cv_header_stdc = yes; then
7413 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415 :
7416else
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418/* end confdefs.h. */
7419#include <ctype.h>
7420#include <stdlib.h>
7421#if ((' ' & 0x0FF) == 0x020)
7422# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7423# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7424#else
7425# define ISLOWER(c) \
7426 (('a' <= (c) && (c) <= 'i') \
7427 || ('j' <= (c) && (c) <= 'r') \
7428 || ('s' <= (c) && (c) <= 'z'))
7429# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7430#endif
7431
7432#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7433int
7434main ()
7435{
7436 int i;
7437 for (i = 0; i < 256; i++)
7438 if (XOR (islower (i), ISLOWER (i))
7439 || toupper (i) != TOUPPER (i))
7440 return 2;
7441 return 0;
7442}
7443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007444if ac_fn_c_try_run "$LINENO"; then :
7445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446else
Matthias Kloseb9621712010-04-24 17:59:49 +00007447 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7450 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451fi
7452
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453fi
7454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7456$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457if test $ac_cv_header_stdc = yes; then
7458
Matthias Kloseb9621712010-04-24 17:59:49 +00007459$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460
7461fi
7462
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007463for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007464fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007465ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007466sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007467unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007468poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007469sys/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 +01007470sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007471sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007472sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007473sys/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 -07007474libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007475bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007476sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007477do :
7478 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7479ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007480if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007481 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007482#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007483_ACEOF
7484
7485fi
7486
Guido van Rossum627b2d71993-12-24 10:39:16 +00007487done
7488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007489ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007490for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7493$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007494if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007496else
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007498/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007499#include <sys/types.h>
7500#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007501
Martin v. Löwis11437992002-04-12 09:54:03 +00007502int
7503main ()
7504{
7505if ((DIR *) 0)
7506return 0;
7507 ;
7508 return 0;
7509}
7510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007512 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007513else
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007518eval ac_res=\$$as_ac_Header
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7520$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007521if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007523#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007524_ACEOF
7525
7526ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007527fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007529done
7530# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7531if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7533$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007534if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007536else
Martin v. Löwis11437992002-04-12 09:54:03 +00007537 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007541/* Override any GCC internal prototype to avoid an error.
7542 Use char because int might match the return type of a GCC
7543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007544#ifdef __cplusplus
7545extern "C"
7546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007547char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007548int
7549main ()
7550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 ;
7553 return 0;
7554}
7555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007556for ac_lib in '' dir; do
7557 if test -z "$ac_lib"; then
7558 ac_res="none required"
7559 else
7560 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007561 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007564 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566rm -f core conftest.err conftest.$ac_objext \
7567 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007568 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007569 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571done
Victor Stinnere0be4232011-10-25 13:06:09 +02007572if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007574else
7575 ac_cv_search_opendir=no
7576fi
7577rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007578LIBS=$ac_func_search_save_LIBS
7579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7581$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007583if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007584 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007587
Michael W. Hudson54241132001-12-07 15:38:26 +00007588else
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7590$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007591if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007593else
7594 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598/* Override any GCC internal prototype to avoid an error.
7599 Use char because int might match the return type of a GCC
7600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007601#ifdef __cplusplus
7602extern "C"
7603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007604char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007605int
7606main ()
7607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 ;
7610 return 0;
7611}
7612_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613for ac_lib in '' x; do
7614 if test -z "$ac_lib"; then
7615 ac_res="none required"
7616 else
7617 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007623rm -f core conftest.err conftest.$ac_objext \
7624 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007625 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628done
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631else
7632 ac_cv_search_opendir=no
7633fi
7634rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007635LIBS=$ac_func_search_save_LIBS
7636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7638$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007640if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007642
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007643fi
7644
7645fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007646
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7648$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007649if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007651else
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007653/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007654#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007655int
7656main ()
7657{
7658return makedev(0, 0);
7659 ;
7660 return 0;
7661}
7662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007664 ac_cv_header_sys_types_h_makedev=yes
7665else
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668rm -f core conftest.err conftest.$ac_objext \
7669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007670
7671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7673$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007674
7675if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007676ac_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 +02007677if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007678
Matthias Kloseb9621712010-04-24 17:59:49 +00007679$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007680
7681fi
7682
7683
7684
7685 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 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 +02007687if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007688
Matthias Kloseb9621712010-04-24 17:59:49 +00007689$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007690
7691fi
7692
7693
7694 fi
7695fi
7696
Michael W. Hudson54241132001-12-07 15:38:26 +00007697
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007698# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7699for ac_header in net/if.h
7700do :
7701 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7702#ifdef STDC_HEADERS
7703# include <stdlib.h>
7704# include <stddef.h>
7705#else
7706# ifdef HAVE_STDLIB_H
7707# include <stdlib.h>
7708# endif
7709#endif
7710#ifdef HAVE_SYS_SOCKET_H
7711# include <sys/socket.h>
7712#endif
7713
7714"
Victor Stinnere0be4232011-10-25 13:06:09 +02007715if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007716 cat >>confdefs.h <<_ACEOF
7717#define HAVE_NET_IF_H 1
7718_ACEOF
7719
7720fi
7721
7722done
7723
7724
Martin v. Löwis11017b12006-01-14 18:12:57 +00007725# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007726for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007727do :
7728 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 +00007729#ifdef HAVE_ASM_TYPES_H
7730#include <asm/types.h>
7731#endif
7732#ifdef HAVE_SYS_SOCKET_H
7733#include <sys/socket.h>
7734#endif
7735
Matthias Kloseb9621712010-04-24 17:59:49 +00007736"
Victor Stinnere0be4232011-10-25 13:06:09 +02007737if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007738 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007739#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007740_ACEOF
7741
7742fi
7743
7744done
7745
7746
Charles-François Natali47413c12011-10-06 19:47:44 +02007747# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007748for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007749do :
7750 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7751ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7752#ifdef HAVE_SYS_SOCKET_H
7753#include <sys/socket.h>
7754#endif
7755
7756"
7757if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7758 cat >>confdefs.h <<_ACEOF
7759#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7760_ACEOF
7761
7762fi
7763
7764done
7765
7766
Guido van Rossum627b2d71993-12-24 10:39:16 +00007767# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007768was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7770$as_echo_n "checking for clock_t in time.h... " >&6; }
7771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007772/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007773#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007774
7775_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007778 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007779else
Martin v. Löwis11437992002-04-12 09:54:03 +00007780
7781
Matthias Kloseb9621712010-04-24 17:59:49 +00007782$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007784
Guido van Rossum627b2d71993-12-24 10:39:16 +00007785fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007786rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007787
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7789$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007790
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7792$as_echo_n "checking for makedev... " >&6; }
7793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007795
Jesus Cea740f53a2010-04-28 11:35:30 +00007796#if defined(MAJOR_IN_MKDEV)
7797#include <sys/mkdev.h>
7798#elif defined(MAJOR_IN_SYSMACROS)
7799#include <sys/sysmacros.h>
7800#else
7801#include <sys/types.h>
7802#endif
7803
Neal Norwitz11690112002-07-30 01:08:28 +00007804int
7805main ()
7806{
Jesus Cea740f53a2010-04-28 11:35:30 +00007807
7808 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007809 ;
7810 return 0;
7811}
Matthias Kloseb159a552010-04-25 21:00:44 +00007812
Neal Norwitz11690112002-07-30 01:08:28 +00007813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007814if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007815 ac_cv_has_makedev=yes
7816else
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819rm -f core conftest.err conftest.$ac_objext \
7820 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7822$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007823if test "$ac_cv_has_makedev" = "yes"; then
7824
Matthias Kloseb9621712010-04-24 17:59:49 +00007825$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007826
7827fi
7828
Christian Heimes985ecdc2013-11-20 11:46:18 +01007829# byte swapping
7830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7831$as_echo_n "checking for le64toh... " >&6; }
7832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7833/* end confdefs.h. */
7834
7835#ifdef HAVE_ENDIAN_H
7836#include <endian.h>
7837#elif defined(HAVE_SYS_ENDIAN_H)
7838#include <sys/endian.h>
7839#endif
7840
7841int
7842main ()
7843{
7844
7845 le64toh(1)
7846 ;
7847 return 0;
7848}
7849
7850_ACEOF
7851if ac_fn_c_try_link "$LINENO"; then :
7852 ac_cv_has_le64toh=yes
7853else
7854 ac_cv_has_le64toh=no
7855fi
7856rm -f core conftest.err conftest.$ac_objext \
7857 conftest$ac_exeext conftest.$ac_ext
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7859$as_echo "$ac_cv_has_le64toh" >&6; }
7860if test "$ac_cv_has_le64toh" = "yes"; then
7861
7862$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7863
7864fi
7865
Martin v. Löwis399a6892002-10-04 10:22:02 +00007866# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7867# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7868# defined, but the compiler does not support pragma redefine_extname,
7869# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7870# structures (such as rlimit64) without declaring them. As a
7871# work-around, disable LFS on such configurations
7872
7873use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7875$as_echo_n "checking Solaris LFS bug... " >&6; }
7876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007878
7879#define _LARGEFILE_SOURCE 1
7880#define _FILE_OFFSET_BITS 64
7881#include <sys/resource.h>
7882
Martin v. Löwis399a6892002-10-04 10:22:02 +00007883int
7884main ()
7885{
7886struct rlimit foo;
7887 ;
7888 return 0;
7889}
7890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007892 sol_lfs_bug=no
7893else
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7898$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007899if test "$sol_lfs_bug" = "yes"; then
7900 use_lfs=no
7901fi
7902
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007903# Don't use largefile support for GNU/Hurd
7904case $ac_sys_system in GNU*)
7905 use_lfs=no
7906esac
7907
Martin v. Löwis399a6892002-10-04 10:22:02 +00007908if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007909# Two defines needed to enable largefile support on various platforms
7910# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007911case $ac_sys_system/$ac_sys_release in
7912AIX*)
7913
7914$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7915
7916 ;;
7917esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007918
Matthias Kloseb9621712010-04-24 17:59:49 +00007919$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
7921
Matthias Kloseb9621712010-04-24 17:59:49 +00007922$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007923
Martin v. Löwis399a6892002-10-04 10:22:02 +00007924fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007925
Guido van Rossum84e7b241996-08-19 21:59:00 +00007926# Add some code to confdefs.h so that the test for off_t works on SCO
7927cat >> confdefs.h <<\EOF
7928#if defined(SCO_DS)
7929#undef _OFF_T
7930#endif
7931EOF
7932
Guido van Rossumef2255b2000-03-10 22:30:29 +00007933# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007934ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007935if test "x$ac_cv_type_mode_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
7940#define mode_t int
7941_ACEOF
7942
7943fi
7944
Matthias Kloseb9621712010-04-24 17:59:49 +00007945ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007946if test "x$ac_cv_type_off_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007952_ACEOF
7953
7954fi
7955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007957if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007958
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007959else
Martin v. Löwis11437992002-04-12 09:54:03 +00007960
7961cat >>confdefs.h <<_ACEOF
7962#define pid_t int
7963_ACEOF
7964
7965fi
7966
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007969#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007970_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007971
Matthias Kloseb9621712010-04-24 17:59:49 +00007972ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007973if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007974
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975else
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
7977cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007979_ACEOF
7980
7981fi
7982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7984$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007985if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007986 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Kloseb9621712010-04-24 17:59:49 +00007988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007991
7992_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995 ac_cv_type_uid_t=yes
7996else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997 ac_cv_type_uid_t=no
7998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007999rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8003$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008004if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008005
Matthias Kloseb9621712010-04-24 17:59:49 +00008006$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008007
8008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008010
8011fi
8012
Mark Dickinson983bc162012-12-02 12:11:38 +00008013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008018
8019fi
8020
Stefan Krah1919b7e2012-03-21 18:25:23 +01008021ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8022if test "x$ac_cv_type___uint128_t" = xyes; then :
8023
8024$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8025
8026fi
8027
Jack Jansendd19cf82001-12-06 22:36:17 +00008028
Michael W. Hudson54241132001-12-07 15:38:26 +00008029# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008030# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031# The cast to long int works around a bug in the HP C Compiler
8032# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8033# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8034# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8036$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008037if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008039else
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 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 +00008041
Martin v. Löwis11437992002-04-12 09:54:03 +00008042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 if test "$ac_cv_type_int" = yes; then
8044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008046as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008047See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048 else
8049 ac_cv_sizeof_int=0
8050 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052
Martin v. Löwis11437992002-04-12 09:54:03 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8055$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056
8057
8058
Martin v. Löwis11437992002-04-12 09:54:03 +00008059cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008060#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008061_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008062
8063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064# The cast to long int works around a bug in the HP C Compiler
8065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8069$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008070if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 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 +00008074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075else
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 if test "$ac_cv_type_long" = yes; then
8077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008079as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008080See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081 else
8082 ac_cv_sizeof_long=0
8083 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008085
Martin v. Löwis11437992002-04-12 09:54:03 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8088$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089
8090
8091
Martin v. Löwis11437992002-04-12 09:54:03 +00008092cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008093#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008094_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008095
8096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097# The cast to long int works around a bug in the HP C Compiler
8098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8100# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8102$as_echo_n "checking size of long long... " >&6; }
8103if ${ac_cv_sizeof_long_long+:} false; then :
8104 $as_echo_n "(cached) " >&6
8105else
8106 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8107
8108else
8109 if test "$ac_cv_type_long_long" = yes; then
8110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8112as_fn_error 77 "cannot compute sizeof (long long)
8113See \`config.log' for more details" "$LINENO" 5; }
8114 else
8115 ac_cv_sizeof_long_long=0
8116 fi
8117fi
8118
8119fi
8120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8121$as_echo "$ac_cv_sizeof_long_long" >&6; }
8122
8123
8124
8125cat >>confdefs.h <<_ACEOF
8126#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8127_ACEOF
8128
8129
8130# The cast to long int works around a bug in the HP C Compiler
8131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8133# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8135$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008136if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 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 +00008140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141else
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 if test "$ac_cv_type_void_p" = yes; then
8143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008145as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008146See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 else
8148 ac_cv_sizeof_void_p=0
8149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008151
Martin v. Löwis11437992002-04-12 09:54:03 +00008152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8154$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155
8156
8157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008159#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008160_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008161
8162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163# The cast to long int works around a bug in the HP C Compiler
8164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8168$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 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 +00008173
Martin v. Löwis11437992002-04-12 09:54:03 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 if test "$ac_cv_type_short" = yes; then
8176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008178as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008179See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180 else
8181 ac_cv_sizeof_short=0
8182 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8187$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188
8189
8190
Martin v. Löwis11437992002-04-12 09:54:03 +00008191cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008192#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008193_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194
8195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196# The cast to long int works around a bug in the HP C Compiler
8197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8199# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8201$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008202if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008204else
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 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 +00008206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207else
Matthias Kloseb9621712010-04-24 17:59:49 +00008208 if test "$ac_cv_type_float" = yes; then
8209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008211as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008212See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 else
8214 ac_cv_sizeof_float=0
8215 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008217
Martin v. Löwis11437992002-04-12 09:54:03 +00008218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8220$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221
8222
8223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008225#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008226_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008227
8228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229# The cast to long int works around a bug in the HP C Compiler
8230# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8231# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8232# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8234$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008235if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008237else
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 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 +00008239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 if test "$ac_cv_type_double" = yes; then
8242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008244as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008245See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246 else
8247 ac_cv_sizeof_double=0
8248 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8253$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254
8255
8256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008258#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008259_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008260
8261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262# The cast to long int works around a bug in the HP C Compiler
8263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8265# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8267$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008270else
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 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 +00008272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273else
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 if test "$ac_cv_type_fpos_t" = yes; then
8275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008277as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008278See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 else
8280 ac_cv_sizeof_fpos_t=0
8281 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8286$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287
8288
8289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008291#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008293
Michael W. Hudson54241132001-12-07 15:38:26 +00008294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295# The cast to long int works around a bug in the HP C Compiler
8296# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8297# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8298# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8300$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008301if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 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 +00008305
Martin v. Löwis18e16552006-02-15 17:27:45 +00008306else
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 if test "$ac_cv_type_size_t" = yes; then
8308 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008310as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008311See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 else
8313 ac_cv_sizeof_size_t=0
8314 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316
Martin v. Löwis18e16552006-02-15 17:27:45 +00008317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8319$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320
8321
8322
Martin v. Löwis18e16552006-02-15 17:27:45 +00008323cat >>confdefs.h <<_ACEOF
8324#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8325_ACEOF
8326
8327
Christian Heimes400adb02008-02-01 08:12:03 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8333$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008334if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008336else
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 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 +00008338
Christian Heimes400adb02008-02-01 08:12:03 +00008339else
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 if test "$ac_cv_type_pid_t" = yes; then
8341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008343as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008344See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008345 else
8346 ac_cv_sizeof_pid_t=0
8347 fi
8348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349
Christian Heimes400adb02008-02-01 08:12:03 +00008350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8352$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008353
8354
8355
8356cat >>confdefs.h <<_ACEOF
8357#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8358_ACEOF
8359
8360
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
8365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8366$as_echo_n "checking size of uintptr_t... " >&6; }
8367if ${ac_cv_sizeof_uintptr_t+:} false; then :
8368 $as_echo_n "(cached) " >&6
8369else
8370 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8371
8372else
8373 if test "$ac_cv_type_uintptr_t" = yes; then
8374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8376as_fn_error 77 "cannot compute sizeof (uintptr_t)
8377See \`config.log' for more details" "$LINENO" 5; }
8378 else
8379 ac_cv_sizeof_uintptr_t=0
8380 fi
8381fi
8382
8383fi
8384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8385$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8386
8387
8388
8389cat >>confdefs.h <<_ACEOF
8390#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8391_ACEOF
8392
8393
Michael W. Hudson54241132001-12-07 15:38:26 +00008394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8396$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008397have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008399/* end confdefs.h. */
8400
8401int
8402main ()
8403{
8404long double x; x = (long double)0;
8405 ;
8406 return 0;
8407}
8408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008409if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008410
8411
Matthias Kloseb9621712010-04-24 17:59:49 +00008412$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008413
8414 have_long_double=yes
8415
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008416fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8419$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008420if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008421# The cast to long int works around a bug in the HP C Compiler
8422# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8423# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8424# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8426$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008427if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008429else
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 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 +00008431
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 if test "$ac_cv_type_long_double" = yes; then
8434 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008436as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008437See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008438 else
8439 ac_cv_sizeof_long_double=0
8440 fi
8441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008442
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8445$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008446
8447
8448
8449cat >>confdefs.h <<_ACEOF
8450#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8451_ACEOF
8452
8453
8454fi
8455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456# The cast to long int works around a bug in the HP C Compiler
8457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8461$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 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 +00008466
Thomas Woutersb2137042007-02-01 18:02:27 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 if test "$ac_cv_type__Bool" = yes; then
8469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008471as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008472See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473 else
8474 ac_cv_sizeof__Bool=0
8475 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008477
Thomas Woutersb2137042007-02-01 18:02:27 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8480$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481
8482
8483
Thomas Woutersb2137042007-02-01 18:02:27 +00008484cat >>confdefs.h <<_ACEOF
8485#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8486_ACEOF
8487
8488
Thomas Woutersb2137042007-02-01 18:02:27 +00008489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8495$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008500#ifdef HAVE_SYS_TYPES_H
8501#include <sys/types.h>
8502#endif
8503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008505
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008506else
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 if test "$ac_cv_type_off_t" = yes; then
8508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008510as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008511See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008512 else
8513 ac_cv_sizeof_off_t=0
8514 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8519$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008520
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008521
8522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008524#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008525_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008526
Michael W. Hudson54241132001-12-07 15:38:26 +00008527
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008528
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8530$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008531if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008532 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008535
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8537$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8540$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008541fi
8542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008543# The cast to long int works around a bug in the HP C Compiler
8544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8546# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8548$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008549if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008553#ifdef HAVE_SYS_TYPES_H
8554#include <sys/types.h>
8555#endif
8556#ifdef HAVE_TIME_H
8557#include <time.h>
8558#endif
8559
Matthias Kloseb9621712010-04-24 17:59:49 +00008560"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 if test "$ac_cv_type_time_t" = yes; then
8564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008566as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008567See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008568 else
8569 ac_cv_sizeof_time_t=0
8570 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8575$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008577
8578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008580#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008581_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008582
Michael W. Hudson54241132001-12-07 15:38:26 +00008583
8584
Trent Mick635f6fb2000-08-23 21:33:05 +00008585# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008586ac_save_cc="$CC"
8587if test "$ac_cv_kpthread" = "yes"
8588then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008589elif test "$ac_cv_kthread" = "yes"
8590then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008591elif test "$ac_cv_pthread" = "yes"
8592then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008593fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8596$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008597have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008599/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008600
8601 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008602int
8603main ()
8604{
Guido van Rossum12580492000-09-24 16:47:19 +00008605pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 ;
8607 return 0;
8608}
Matthias Kloseb159a552010-04-25 21:00:44 +00008609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008611if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008612 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8616$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008617if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8621# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8623$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008624if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008628#ifdef HAVE_PTHREAD_H
8629#include <pthread.h>
8630#endif
8631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008633
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008634else
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 if test "$ac_cv_type_pthread_t" = yes; then
8636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008638as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008639See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008640 else
8641 ac_cv_sizeof_pthread_t=0
8642 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644
Trent Mick635f6fb2000-08-23 21:33:05 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8647$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008648
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008649
8650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008652#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008653_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008654
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008655
Trent Mick635f6fb2000-08-23 21:33:05 +00008656fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008657CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008658
Michael W. Hudson54241132001-12-07 15:38:26 +00008659
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008660case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008661 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008662 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8663 ;;
8664 Darwin/*)
8665 OTHER_LIBTOOL_OPT=""
8666 ;;
8667esac
8668
8669
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008670
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008671case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008672 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008673 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8674 if test "${enable_universalsdk}"; then
8675 :
8676 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008677 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008678 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008679 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008680 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008681 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008682 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008683 if test ${gcc_version} '<' 4.0
8684 then
8685 LIBTOOL_CRUFT="-lcc_dynamic"
8686 else
8687 LIBTOOL_CRUFT=""
8688 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008690 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008691else
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008693/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008694
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008695 #include <unistd.h>
8696 int main(int argc, char*argv[])
8697 {
8698 if (sizeof(long) == 4) {
8699 return 0;
8700 } else {
8701 return 1;
8702 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008703 }
8704
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008706if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008707 ac_osx_32bit=yes
8708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008713fi
8714
8715
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008716 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008717 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008718 i386)
8719 MACOSX_DEFAULT_ARCH="i386"
8720 ;;
8721 ppc)
8722 MACOSX_DEFAULT_ARCH="ppc"
8723 ;;
8724 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008725 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008726 ;;
8727 esac
8728 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008729 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008730 i386)
8731 MACOSX_DEFAULT_ARCH="x86_64"
8732 ;;
8733 ppc)
8734 MACOSX_DEFAULT_ARCH="ppc64"
8735 ;;
8736 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008737 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008738 ;;
8739 esac
8740
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008741 fi
8742
8743 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008744 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008745 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008746esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8748$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008749if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008750then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008751 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008753 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8758$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008759 if test $enable_shared = "yes"
8760 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008761 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 +00008762 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008763else
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8765$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008766fi
8767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8769$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008770case $ac_sys_system/$ac_sys_release in
8771 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008772
Matthias Kloseb9621712010-04-24 17:59:49 +00008773$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008774
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8776$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008777 ;;
8778 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8780$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008781 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008782esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008783
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785
Michael W. Hudson54241132001-12-07 15:38:26 +00008786
8787
8788
8789
Benjamin Peterson99f03762010-04-11 22:15:28 +00008790
Thomas Wouters477c8d52006-05-27 19:21:47 +00008791
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008792# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8793# -- usually .so, .sl on HP-UX, .dll on Cygwin
8794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8795$as_echo_n "checking the extension of shared libraries... " >&6; }
8796if test -z "$SHLIB_SUFFIX"; then
8797 case $ac_sys_system in
8798 hp*|HP*)
8799 case `uname -m` in
8800 ia64) SHLIB_SUFFIX=.so;;
8801 *) SHLIB_SUFFIX=.sl;;
8802 esac
8803 ;;
8804 CYGWIN*) SHLIB_SUFFIX=.dll;;
8805 *) SHLIB_SUFFIX=.so;;
8806 esac
8807fi
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8809$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008810
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008812# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008813# (Shared libraries in this instance are shared modules to be loaded into
8814# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8816$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817if test -z "$LDSHARED"
8818then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008819 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008820 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008821 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008822 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008823 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008824 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008825 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008827 if test "$GCC" = "yes" ; then
8828 LDSHARED='$(CC) -shared'
8829 LDCXXSHARED='$(CXX) -shared'
8830 else
8831 LDSHARED='$(CC) -G'
8832 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008833 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008834 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008835 if test "$GCC" = "yes" ; then
8836 LDSHARED='$(CC) -shared'
8837 LDCXXSHARED='$(CXX) -shared'
8838 else
8839 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008840 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008841 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008842 LDSHARED='$(CC) -bundle'
8843 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008844 if test "$enable_framework" ; then
8845 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008846 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8847 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008848 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008849 else
8850 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008851 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008852 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008853 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008854 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008855 LDSHARED='$(CC) -bundle'
8856 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008857 if test "$enable_framework" ; then
8858 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008859 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8860 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008861 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008862 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008863 # No framework, use the Python app as bundle-loader
8864 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008865 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008866 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008867 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008868 Darwin/*)
8869 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8870 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008871
Ned Deily36820b62014-06-25 13:44:22 -07008872 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8873 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8874 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8875 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8876 if test ${dep_target_major} -eq 10 && \
8877 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008878 then
Ned Deily36820b62014-06-25 13:44:22 -07008879 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008880 LDSHARED='$(CC) -bundle'
8881 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008882 if test "$enable_framework" ; then
8883 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008884 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8885 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008886 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008887 else
8888 # No framework, use the Python app as bundle-loader
8889 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8890 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008891 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008892 fi
Ned Deily36820b62014-06-25 13:44:22 -07008893 else
8894 # building for OS X 10.3 and later
8895 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8896 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8897 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008898 fi
8899 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008900 Linux*|GNU*|QNX*)
8901 LDSHARED='$(CC) -shared'
8902 LDCXXSHARED='$(CXX) -shared';;
8903 BSD/OS*/4*)
8904 LDSHARED="gcc -shared"
8905 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008906 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008907 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008908 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008909 LDSHARED='$(CC) -shared'
8910 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008911 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008912 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008913 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008914 OpenBSD*)
8915 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8916 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008917 LDSHARED='$(CC) -shared $(CCSHARED)'
8918 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008919 else
8920 case `uname -r` in
8921 [01].* | 2.[0-7] | 2.[0-7].*)
8922 LDSHARED="ld -Bshareable ${LDFLAGS}"
8923 ;;
8924 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008925 LDSHARED='$(CC) -shared $(CCSHARED)'
8926 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008927 ;;
8928 esac
8929 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008930 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008931 LDSHARED='$(CC) -shared'
8932 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008933 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008934 if test "$GCC" = "yes" ; then
8935 LDSHARED='$(CC) -shared'
8936 LDCXXSHARED='$(CXX) -shared'
8937 else
8938 LDSHARED='$(CC) -G'
8939 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008940 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008941 SCO_SV*)
8942 LDSHARED='$(CC) -Wl,-G,-Bexport'
8943 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8944 CYGWIN*)
8945 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8946 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008947 *) LDSHARED="ld";;
8948 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8951$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008952LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008953BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008954# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008955# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8957$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008958if test -z "$CCSHARED"
8959then
Guido van Rossum07397971997-04-29 21:49:50 +00008960 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008961 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008962 then CCSHARED="-fPIC";
8963 elif test `uname -p` = sparc;
8964 then CCSHARED="-xcode=pic32";
8965 else CCSHARED="-Kpic";
8966 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008967 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008968 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008969 else CCSHARED="+z";
8970 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008971 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008972 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008973 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008974 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008975 if test "$GCC" = "yes"
8976 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008977 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008978 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008979 SCO_SV*)
8980 if test "$GCC" = "yes"
8981 then CCSHARED="-fPIC"
8982 else CCSHARED="-Kpic -belf"
8983 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008984 IRIX*/6*) case $CC in
8985 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008986 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008987 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008988 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8991$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008992# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008993# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8995$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008996if test -z "$LINKFORSHARED"
8997then
Guido van Rossum07397971997-04-29 21:49:50 +00008998 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008999 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009000 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009001 LINKFORSHARED="-Wl,-E -Wl,+s";;
9002# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009003 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009004 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009005 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009007 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009008
9009 # Issue #18075: the default maximum stack size (8MBytes) is too
9010 # small for the default recursion limit. Increase the stack size
9011 # to ensure that tests don't crash
9012 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9013
Jack Jansene578a632001-08-15 01:27:14 +00009014 if test "$enable_framework"
9015 then
Jack Jansenda49e192005-01-07 13:08:22 +00009016 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009017 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009018 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009019 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009020 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009021 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009022 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009023 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9024 then
9025 LINKFORSHARED="-Wl,--export-dynamic"
9026 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009027 SunOS/5*) case $CC in
9028 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009029 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009030 then
9031 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009032 fi;;
9033 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009034 CYGWIN*)
9035 if test $enable_shared = "no"
9036 then
9037 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9038 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009039 QNX*)
9040 # -Wl,-E causes the symbols to be added to the dynamic
9041 # symbol table so that they can be found when a module
9042 # is loaded. -N 2048K causes the stack size to be set
9043 # to 2048 kilobytes so that the stack doesn't overflow
9044 # when running test_compile.py.
9045 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009046 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9049$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009050
Michael W. Hudson54241132001-12-07 15:38:26 +00009051
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9054$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009055if test ! "$LIBRARY" = "$LDLIBRARY"
9056then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009057 case $ac_sys_system in
9058 CYGWIN*)
9059 # Cygwin needs CCSHARED when building extension DLLs
9060 # but not when building the interpreter DLL.
9061 CFLAGSFORSHARED='';;
9062 *)
9063 CFLAGSFORSHARED='$(CCSHARED)'
9064 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9067$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009068
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009069# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9070# library (with --enable-shared).
9071# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009072# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9073# if it is not required, since it creates a dependency of the shared library
9074# to LIBS. This, in turn, means that applications linking the shared libpython
9075# don't need to link LIBS explicitly. The default should be only changed
9076# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009077
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9079$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009080case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009081 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009082 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009083esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9085$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009086
9087
Guido van Rossum627b2d71993-12-24 10:39:16 +00009088# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9090$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009091if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009092 $as_echo_n "(cached) " >&6
9093else
9094 ac_check_lib_save_LIBS=$LIBS
9095LIBS="-lsendfile $LIBS"
9096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9097/* end confdefs.h. */
9098
9099/* Override any GCC internal prototype to avoid an error.
9100 Use char because int might match the return type of a GCC
9101 builtin and then its argument prototype would still apply. */
9102#ifdef __cplusplus
9103extern "C"
9104#endif
9105char sendfile ();
9106int
9107main ()
9108{
9109return sendfile ();
9110 ;
9111 return 0;
9112}
9113_ACEOF
9114if ac_fn_c_try_link "$LINENO"; then :
9115 ac_cv_lib_sendfile_sendfile=yes
9116else
9117 ac_cv_lib_sendfile_sendfile=no
9118fi
9119rm -f core conftest.err conftest.$ac_objext \
9120 conftest$ac_exeext conftest.$ac_ext
9121LIBS=$ac_check_lib_save_LIBS
9122fi
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9124$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009125if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009126 cat >>confdefs.h <<_ACEOF
9127#define HAVE_LIBSENDFILE 1
9128_ACEOF
9129
9130 LIBS="-lsendfile $LIBS"
9131
9132fi
9133
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9135$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009136if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009138else
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009140LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144/* Override any GCC internal prototype to avoid an error.
9145 Use char because int might match the return type of a GCC
9146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009147#ifdef __cplusplus
9148extern "C"
9149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009150char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009151int
9152main ()
9153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009154return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ;
9156 return 0;
9157}
9158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009161else
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009164rm -f core conftest.err conftest.$ac_objext \
9165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009166LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9169$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009170if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 cat >>confdefs.h <<_ACEOF
9172#define HAVE_LIBDL 1
9173_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009174
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009175 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009177fi
9178 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9180$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009181if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009182 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009183else
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009185LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189/* Override any GCC internal prototype to avoid an error.
9190 Use char because int might match the return type of a GCC
9191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009192#ifdef __cplusplus
9193extern "C"
9194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009195char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009196int
9197main ()
9198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ;
9201 return 0;
9202}
9203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009206else
Matthias Kloseb9621712010-04-24 17:59:49 +00009207 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009209rm -f core conftest.err conftest.$ac_objext \
9210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009211LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9214$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009215if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009216 cat >>confdefs.h <<_ACEOF
9217#define HAVE_LIBDLD 1
9218_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009219
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009220 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009221
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009222fi
9223 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009224
Georg Brandlb1441c72009-01-03 22:33:39 +00009225# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009226if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9228$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009229if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009231else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009232 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236/* Override any GCC internal prototype to avoid an error.
9237 Use char because int might match the return type of a GCC
9238 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009239#ifdef __cplusplus
9240extern "C"
9241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009242char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009243int
9244main ()
9245{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ;
9248 return 0;
9249}
9250_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251for ac_lib in '' pthread rt posix4; do
9252 if test -z "$ac_lib"; then
9253 ac_res="none required"
9254 else
9255 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009256 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261rm -f core conftest.err conftest.$ac_objext \
9262 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009263 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266done
Victor Stinnere0be4232011-10-25 13:06:09 +02009267if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009268
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269else
9270 ac_cv_search_sem_init=no
9271fi
9272rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009273LIBS=$ac_func_search_save_LIBS
9274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9276$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009278if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009279 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009280
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009281fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009282 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009283 # posix4 on Solaris 2.6
9284 # pthread (first!) on Linux
9285fi
9286
Martin v. Löwis19d17342003-06-14 21:03:05 +00009287# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9289$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009290if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009292else
9293 ac_check_lib_save_LIBS=$LIBS
9294LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009296/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298/* Override any GCC internal prototype to avoid an error.
9299 Use char because int might match the return type of a GCC
9300 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009301#ifdef __cplusplus
9302extern "C"
9303#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009304char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009305int
9306main ()
9307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009309 ;
9310 return 0;
9311}
9312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009313if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009314 ac_cv_lib_intl_textdomain=yes
9315else
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318rm -f core conftest.err conftest.$ac_objext \
9319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009320LIBS=$ac_check_lib_save_LIBS
9321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9323$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009324if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009325
Matthias Kloseb9621712010-04-24 17:59:49 +00009326$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009327
Brett Cannonc6d936e2009-06-07 20:09:53 +00009328 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009329fi
9330
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009331
9332# checks for system dependent C++ extensions support
9333case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9335$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009338
Georg Brandl59e87bd2011-02-15 19:48:59 +00009339 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009340int
9341main ()
9342{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009343loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ;
9345 return 0;
9346}
Matthias Kloseb159a552010-04-25 21:00:44 +00009347
Martin v. Löwis11437992002-04-12 09:54:03 +00009348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009349if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009350
Matthias Kloseb159a552010-04-25 21:00:44 +00009351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
Matthias Kloseb159a552010-04-25 21:00:44 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009355$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009356
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009357else
Matthias Kloseb159a552010-04-25 21:00:44 +00009358
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009360$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009361
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009363rm -f core conftest.err conftest.$ac_objext \
9364 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009365 *) ;;
9366esac
9367
Christian Heimes985ecdc2013-11-20 11:46:18 +01009368# check for systems that require aligned memory access
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9370$as_echo_n "checking aligned memory access is required... " >&6; }
9371if test "$cross_compiling" = yes; then :
9372 aligned_required=yes
9373else
9374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9375/* end confdefs.h. */
9376
9377int main()
9378{
9379 char s[16];
9380 int i, *p1, *p2;
9381 for (i=0; i < 16; i++)
9382 s[i] = i;
9383 p1 = (int*)(s+1);
9384 p2 = (int*)(s+2);
9385 if (*p1 == *p2)
9386 return 1;
9387 return 0;
9388}
9389
9390_ACEOF
9391if ac_fn_c_try_run "$LINENO"; then :
9392 aligned_required=no
9393else
9394 aligned_required=yes
9395fi
9396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9397 conftest.$ac_objext conftest.beam conftest.$ac_ext
9398fi
9399
9400
9401if test "$aligned_required" = yes ; then
9402
9403$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9404
9405fi
9406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9407$as_echo "$aligned_required" >&6; }
9408
9409
9410# str, bytes and memoryview hash algorithm
9411
9412
9413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9414$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9415
9416# Check whether --with-hash_algorithm was given.
9417if test "${with_hash_algorithm+set}" = set; then :
9418 withval=$with_hash_algorithm;
9419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9420$as_echo "$withval" >&6; }
9421case "$withval" in
9422 siphash24)
9423 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9424
9425 ;;
9426 fnv)
9427 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9428
9429 ;;
9430 *)
9431 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9432 ;;
9433esac
9434
9435else
9436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9437$as_echo "default" >&6; }
9438fi
9439
9440
Charles-François Natalid30b0222014-05-08 23:08:51 +01009441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9442$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9443
9444# Check whether --with-address_sanitizer was given.
9445if test "${with_address_sanitizer+set}" = set; then :
9446 withval=$with_address_sanitizer;
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9448$as_echo "$withval" >&6; }
9449BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9450LDFLAGS="-fsanitize=address $LDFLAGS"
9451
9452else
9453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9454$as_echo "no" >&6; }
9455fi
9456
9457
Guido van Rossum70c7f481998-03-26 18:44:10 +00009458# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9460$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009461if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009463else
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009465LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469/* Override any GCC internal prototype to avoid an error.
9470 Use char because int might match the return type of a GCC
9471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472#ifdef __cplusplus
9473extern "C"
9474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009475char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009476int
9477main ()
9478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ;
9481 return 0;
9482}
9483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009486else
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009489rm -f core conftest.err conftest.$ac_objext \
9490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009491LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9494$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009496 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009497fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009498 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9500$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009501if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503else
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009505LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509/* Override any GCC internal prototype to avoid an error.
9510 Use char because int might match the return type of a GCC
9511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009512#ifdef __cplusplus
9513extern "C"
9514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009515char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009526else
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529rm -f core conftest.err conftest.$ac_objext \
9530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009531LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9534$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009535if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009536 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009537fi
9538 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9541$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9547$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009548LIBS="$withval $LIBS"
9549
9550else
Matthias Kloseb9621712010-04-24 17:59:49 +00009551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553fi
9554
Guido van Rossum7f43da71994-08-01 12:15:30 +00009555
Victor Stinner8291b5e2015-03-20 16:03:14 +01009556
9557
9558
9559
9560
9561
9562
9563if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9564 if test -n "$ac_tool_prefix"; then
9565 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9566set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9568$as_echo_n "checking for $ac_word... " >&6; }
9569if ${ac_cv_path_PKG_CONFIG+:} false; then :
9570 $as_echo_n "(cached) " >&6
9571else
9572 case $PKG_CONFIG in
9573 [\\/]* | ?:[\\/]*)
9574 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9575 ;;
9576 *)
9577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9578for as_dir in $PATH
9579do
9580 IFS=$as_save_IFS
9581 test -z "$as_dir" && as_dir=.
9582 for ac_exec_ext in '' $ac_executable_extensions; do
9583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9584 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9586 break 2
9587 fi
9588done
9589 done
9590IFS=$as_save_IFS
9591
9592 ;;
9593esac
9594fi
9595PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9596if test -n "$PKG_CONFIG"; then
9597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9598$as_echo "$PKG_CONFIG" >&6; }
9599else
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9601$as_echo "no" >&6; }
9602fi
9603
9604
9605fi
9606if test -z "$ac_cv_path_PKG_CONFIG"; then
9607 ac_pt_PKG_CONFIG=$PKG_CONFIG
9608 # Extract the first word of "pkg-config", so it can be a program name with args.
9609set dummy pkg-config; ac_word=$2
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9611$as_echo_n "checking for $ac_word... " >&6; }
9612if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9613 $as_echo_n "(cached) " >&6
9614else
9615 case $ac_pt_PKG_CONFIG in
9616 [\\/]* | ?:[\\/]*)
9617 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9618 ;;
9619 *)
9620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9621for as_dir in $PATH
9622do
9623 IFS=$as_save_IFS
9624 test -z "$as_dir" && as_dir=.
9625 for ac_exec_ext in '' $ac_executable_extensions; do
9626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9627 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9629 break 2
9630 fi
9631done
9632 done
9633IFS=$as_save_IFS
9634
9635 ;;
9636esac
9637fi
9638ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9639if test -n "$ac_pt_PKG_CONFIG"; then
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9641$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9642else
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
9645fi
9646
9647 if test "x$ac_pt_PKG_CONFIG" = x; then
9648 PKG_CONFIG=""
9649 else
9650 case $cross_compiling:$ac_tool_warned in
9651yes:)
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9653$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9654ac_tool_warned=yes ;;
9655esac
9656 PKG_CONFIG=$ac_pt_PKG_CONFIG
9657 fi
9658else
9659 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9660fi
9661
9662fi
9663if test -n "$PKG_CONFIG"; then
9664 _pkg_min_version=0.9.0
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9666$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9667 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9669$as_echo "yes" >&6; }
9670 else
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672$as_echo "no" >&6; }
9673 PKG_CONFIG=""
9674 fi
9675fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009676
9677# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9679$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009680
9681# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009682if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009683 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009684else
9685 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009686fi
9687
9688
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9690$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009691
9692# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9694$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009695
9696# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009697if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009698 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009699else
9700 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009701fi
9702
9703
9704if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009705 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9706else
9707 LIBFFI_INCLUDEDIR=""
9708fi
9709
9710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9712$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009713
Stefan Krah60187b52012-03-23 19:06:27 +01009714# Check for use of the system libmpdec library
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9716$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9717
9718# Check whether --with-system_libmpdec was given.
9719if test "${with_system_libmpdec+set}" = set; then :
9720 withval=$with_system_libmpdec;
9721else
9722 with_system_libmpdec="no"
9723fi
9724
9725
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9727$as_echo "$with_system_libmpdec" >&6; }
9728
Benjamin Peterson076ed002010-10-31 17:11:02 +00009729# Check for support for loadable sqlite extensions
9730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9731$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9732# Check whether --enable-loadable-sqlite-extensions was given.
9733if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9734 enableval=$enable_loadable_sqlite_extensions;
9735else
9736 enable_loadable_sqlite_extensions="no"
9737fi
9738
9739
9740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9741$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9742
Ned Deilyd819b932013-09-06 01:07:05 -07009743# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9744
9745
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9747$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9748
9749# Check whether --with-tcltk-includes was given.
9750if test "${with_tcltk_includes+set}" = set; then :
9751 withval=$with_tcltk_includes;
9752else
9753 with_tcltk_includes="default"
9754fi
9755
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9757$as_echo "$with_tcltk_includes" >&6; }
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9759$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9760
9761# Check whether --with-tcltk-libs was given.
9762if test "${with_tcltk_libs+set}" = set; then :
9763 withval=$with_tcltk_libs;
9764else
9765 with_tcltk_libs="default"
9766fi
9767
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9769$as_echo "$with_tcltk_libs" >&6; }
9770if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9771then
9772 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9773 then
9774 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9775 fi
9776 TCLTK_INCLUDES=""
9777 TCLTK_LIBS=""
9778else
9779 TCLTK_INCLUDES="$with_tcltk_includes"
9780 TCLTK_LIBS="$with_tcltk_libs"
9781fi
9782
Matthias Klose55708cc2009-04-30 08:06:49 +00009783# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9785$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009786
9787# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009788if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009789 withval=$with_dbmliborder;
9790if test x$with_dbmliborder = xyes
9791then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009792as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009793else
9794 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9795 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9796 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009797 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009798 fi
9799 done
9800fi
9801fi
9802
Matthias Kloseb9621712010-04-24 17:59:49 +00009803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9804$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009805
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009806# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009807
9808
Matthias Kloseb9621712010-04-24 17:59:49 +00009809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9810$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814 withval=$with_signal_module;
9815fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009816
9817
9818if test -z "$with_signal_module"
9819then with_signal_module="yes"
9820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9822$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009823
9824if test "${with_signal_module}" = "yes"; then
9825 USE_SIGNAL_MODULE=""
9826 SIGNAL_OBJS=""
9827else
9828 USE_SIGNAL_MODULE="#"
9829 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9830fi
9831
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009832# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009833
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009834USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
9838# Templates for things AC_DEFINEd more than once.
9839# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009840
9841
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
Matthias Kloseb9621712010-04-24 17:59:49 +00009843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9844$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 withval=$with_threads;
9849fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009850
9851
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009852# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 withval=$with_thread; with_threads=$with_thread
9857fi
9858
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009859
9860if test -z "$with_threads"
9861then with_threads="yes"
9862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9864$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009865
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009866
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009867if test "$with_threads" = "no"
9868then
9869 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009870elif test "$ac_cv_pthread_is_default" = yes
9871then
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009873
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009874 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009876
9877 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009879elif test "$ac_cv_kpthread" = "yes"
9880then
9881 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009882 if test "$ac_cv_cxx_thread" = "yes"; then
9883 CXX="$CXX -Kpthread"
9884 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009886
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009887 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009888 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009889elif test "$ac_cv_kthread" = "yes"
9890then
9891 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009892 if test "$ac_cv_cxx_thread" = "yes"; then
9893 CXX="$CXX -Kthread"
9894 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009896
9897 posix_threads=yes
9898 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009899elif test "$ac_cv_pthread" = "yes"
9900then
9901 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009902 if test "$ac_cv_cxx_thread" = "yes"; then
9903 CXX="$CXX -pthread"
9904 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009906
9907 posix_threads=yes
9908 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009909else
9910 if test ! -z "$with_threads" -a -d "$with_threads"
9911 then LDFLAGS="$LDFLAGS -L$with_threads"
9912 fi
9913 if test ! -z "$withval" -a -d "$withval"
9914 then LDFLAGS="$LDFLAGS -L$withval"
9915 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009916
9917 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009918 # define _POSIX_THREADS in unistd.h. Some apparently don't
9919 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9921$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009923/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009924
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009925#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009926#ifdef _POSIX_THREADS
9927yes
9928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009929
9930_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009933 unistd_defines_pthreads=yes
9934else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009935 unistd_defines_pthreads=no
9936fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009937rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009938
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9940$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009943
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009944 # Just looking for pthread_create in libpthread is not enough:
9945 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9946 # So we really have to include pthread.h, and then link.
9947 _libs=$LIBS
9948 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9950$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009952/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009953
9954#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009955#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009956
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009957void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009958int
9959main ()
9960{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009961
9962pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009963 ;
9964 return 0;
9965}
9966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009967if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9970$as_echo "yes" >&6; }
9971 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009972
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009973 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009974 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009975else
Martin v. Löwis11437992002-04-12 09:54:03 +00009976
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009977 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009979if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009981
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009982 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009983 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009984else
Guido van Rossumad678af1998-10-02 14:42:15 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9987$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009988if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009992LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996/* Override any GCC internal prototype to avoid an error.
9997 Use char because int might match the return type of a GCC
9998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009999#ifdef __cplusplus
10000extern "C"
10001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010002char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010003int
10004main ()
10005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ;
10008 return 0;
10009}
10010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010013else
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010016rm -f core conftest.err conftest.$ac_objext \
10017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010018LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10021$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010022if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010024
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010025 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010026 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010027 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010028else
Greg Steinadf63d62000-07-05 10:38:09 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10031$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010032if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010034else
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010036LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040/* Override any GCC internal prototype to avoid an error.
10041 Use char because int might match the return type of a GCC
10042 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043#ifdef __cplusplus
10044extern "C"
10045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010046char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010047int
10048main ()
10049{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 ;
10052 return 0;
10053}
10054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010055if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010057else
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010060rm -f core conftest.err conftest.$ac_objext \
10061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010062LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10065$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010066if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010067 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010068
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010069 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010070 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010071 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010072else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10075$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010076if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010078else
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010080LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010084/* Override any GCC internal prototype to avoid an error.
10085 Use char because int might match the return type of a GCC
10086 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010087#ifdef __cplusplus
10088extern "C"
10089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010090char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010091int
10092main ()
10093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ;
10096 return 0;
10097}
10098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010101else
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010104rm -f core conftest.err conftest.$ac_objext \
10105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010106LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10109$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010110if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010113 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010114 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010115 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010116else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010117
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10119$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010120if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010121 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010122else
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010124LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128/* Override any GCC internal prototype to avoid an error.
10129 Use char because int might match the return type of a GCC
10130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010131#ifdef __cplusplus
10132extern "C"
10133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010134char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010135int
10136main ()
10137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ;
10140 return 0;
10141}
10142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010145else
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010148rm -f core conftest.err conftest.$ac_objext \
10149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010150LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10153$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010154if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010156
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010157 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010158 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010159 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010160else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010161
Martin v. Löwis130fb172001-07-19 11:00:41 +000010162 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010163fi
10164
Guido van Rossum627b2d71993-12-24 10:39:16 +000010165
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010166fi
10167
Guido van Rossum0be3e491997-05-22 20:33:33 +000010168fi
10169
Guido van Rossum49545951997-12-02 19:28:29 +000010170fi
10171
Guido van Rossumb93a8621998-05-07 13:27:32 +000010172fi
10173
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010175rm -f core conftest.err conftest.$ac_objext \
10176 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10179$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010180if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010182else
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010184LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188/* Override any GCC internal prototype to avoid an error.
10189 Use char because int might match the return type of a GCC
10190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010191#ifdef __cplusplus
10192extern "C"
10193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010194char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010195int
10196main ()
10197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ;
10200 return 0;
10201}
10202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010205else
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208rm -f core conftest.err conftest.$ac_objext \
10209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010210LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10213$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010214if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010216
Martin v. Löwis130fb172001-07-19 11:00:41 +000010217 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010218 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010219 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010220fi
10221
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010222
Neal Norwitza978ab02002-11-02 16:58:05 +000010223 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10225$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010226if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010228else
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010230LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234/* Override any GCC internal prototype to avoid an error.
10235 Use char because int might match the return type of a GCC
10236 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010237#ifdef __cplusplus
10238extern "C"
10239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010240char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010241int
10242main ()
10243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ;
10246 return 0;
10247}
10248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010249if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010251else
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010254rm -f core conftest.err conftest.$ac_objext \
10255 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010256LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10259$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010260if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010262
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010263 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010264 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010265 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010266fi
10267
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010268 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010269fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010270
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010271if test "$posix_threads" = "yes"; then
10272 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010273
Matthias Kloseb9621712010-04-24 17:59:49 +000010274$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010275
10276 fi
10277
10278 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10279 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010280 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010281$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010282
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010283 ;;
10284 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010285$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010286
10287 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010288 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010289$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010290
10291 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010292 esac
10293
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10295$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010296 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010298else
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010300 ac_cv_pthread_system_supported=no
10301else
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010304
10305 #include <stdio.h>
10306 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010307 void *foo(void *parm) {
10308 return NULL;
10309 }
10310 main() {
10311 pthread_attr_t attr;
10312 pthread_t id;
10313 if (pthread_attr_init(&attr)) exit(-1);
10314 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10315 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10316 exit(0);
10317 }
10318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010320 ac_cv_pthread_system_supported=yes
10321else
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010326fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328
Guido van Rossum627b2d71993-12-24 10:39:16 +000010329fi
10330
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10332$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010333 if test "$ac_cv_pthread_system_supported" = "yes"; then
10334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010336
10337 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 for ac_func in pthread_sigmask
10339do :
10340 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010341if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010342 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010344_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010345 case $ac_sys_system in
10346 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010349
10350 ;;
10351 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010352fi
10353done
10354
Christian Heimesf77b4b22013-08-21 13:26:05 +020010355 for ac_func in pthread_atfork
10356do :
10357 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10358if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10359 cat >>confdefs.h <<_ACEOF
10360#define HAVE_PTHREAD_ATFORK 1
10361_ACEOF
10362
10363fi
10364done
10365
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010366fi
10367
10368
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010369# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10372$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010376 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10378$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010379 ipv6=no
10380 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10382$as_echo "yes" >&6; }
10383 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010384
10385 ipv6=yes
10386 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010392 /* AF_INET6 available check */
10393#include <sys/types.h>
10394#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010395int
10396main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010397{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010398int domain = AF_INET6;
10399 ;
10400 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010401}
Martin v. Löwis11437992002-04-12 09:54:03 +000010402_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010403if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10406$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010407 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010408
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010409else
Matthias Kloseb159a552010-04-25 21:00:44 +000010410
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10412$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010414
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010415fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010418if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10420$as_echo_n "checking if RFC2553 API is available... " >&6; }
10421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010422/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010423
10424 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010425#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010426int
10427main ()
10428{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010429struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010430 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 ;
10432 return 0;
10433}
Matthias Kloseb159a552010-04-25 21:00:44 +000010434
Martin v. Löwis11437992002-04-12 09:54:03 +000010435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010437
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010440 ipv6=yes
10441
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010442else
Matthias Kloseb159a552010-04-25 21:00:44 +000010443
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010445$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010446 ipv6=no
10447
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010450fi
10451
10452if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010454
10455fi
10456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457fi
10458
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010459
10460ipv6type=unknown
10461ipv6lib=none
10462ipv6trylibc=no
10463
10464if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10466$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010467 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10468 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010469 case $i in
10470 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010472/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010473
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010474#include <netinet/in.h>
10475#ifdef IPV6_INRIA_VERSION
10476yes
10477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010478_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010481 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010482fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010483rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010484
10485 ;;
10486 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010488/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010489
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010490#include <netinet/in.h>
10491#ifdef __KAME__
10492yes
10493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010494_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010497 ipv6type=$i;
10498 ipv6lib=inet6
10499 ipv6libdir=/usr/local/v6/lib
10500 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010502rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503
10504 ;;
10505 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010507/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010508
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010509#include <features.h>
10510#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10511yes
10512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010513_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010516 ipv6type=$i;
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-inet6)
10523 if test -d /usr/inet6; then
10524 ipv6type=$i
10525 ipv6lib=inet6
10526 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010527 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010528 fi
10529 ;;
10530 solaris)
10531 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010532 if $GREP -q tcp6 /etc/netconfig; 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 +000010535 fi
10536 fi
10537 ;;
10538 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010540/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010541
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010542#include <sys/param.h>
10543#ifdef _TOSHIBA_INET6
10544yes
10545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010546_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010549 ipv6type=$i;
10550 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010551 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010553rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010554
10555 ;;
10556 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010559
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010560#include </usr/local/v6/include/sys/v6config.h>
10561#ifdef __V6D__
10562yes
10563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010564_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010567 ipv6type=$i;
10568 ipv6lib=v6;
10569 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010570 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010572rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010573
10574 ;;
10575 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010577/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010578
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010579#include <sys/param.h>
10580#ifdef _ZETA_MINAMI_INET6
10581yes
10582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010586 ipv6type=$i;
10587 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010588 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010590rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010591
10592 ;;
10593 esac
10594 if test "$ipv6type" != "unknown"; then
10595 break
10596 fi
10597 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10599$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010600fi
10601
10602if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10603 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10604 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10605 echo "using lib$ipv6lib"
10606 else
10607 if test $ipv6trylibc = "yes"; then
10608 echo "using libc"
10609 else
10610 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10611 echo "You need to fetch lib$ipv6lib.a from appropriate"
10612 echo 'ipv6 kit and compile beforehand.'
10613 exit 1
10614 fi
10615 fi
10616fi
10617
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10619$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621/* end confdefs.h. */
10622 /* CAN_RAW_FD_FRAMES available check */
10623#include <linux/can/raw.h>
10624int
10625main ()
10626{
10627int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632if ac_fn_c_try_compile "$LINENO"; then :
10633
10634
10635$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10636
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10638$as_echo "yes" >&6; }
10639
10640else
10641
10642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643$as_echo "no" >&6; }
10644
10645fi
10646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10649$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010651/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010652
10653 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010654int
10655main ()
10656{
10657FSIORefNum fRef = 0
10658 ;
10659 return 0;
10660}
Matthias Kloseb159a552010-04-25 21:00:44 +000010661
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010663if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010664
Matthias Kloseb159a552010-04-25 21:00:44 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010667
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10669$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010670
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010671else
Matthias Kloseb159a552010-04-25 21:00:44 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010675
10676fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10678
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010679# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10681$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010684if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685 withval=$with_doc_strings;
10686fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010687
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010688
10689if test -z "$with_doc_strings"
10690then with_doc_strings="yes"
10691fi
10692if test "$with_doc_strings" != "no"
10693then
10694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010696
10697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10699$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010700
Antoine Pitrou042b1282010-08-13 21:15:58 +000010701# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10703$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010708if test "$withval" != no
10709then
10710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10714$as_echo "yes" >&6; }
10715else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010717fi
10718else
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721fi
10722
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010723
10724# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10726$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010729if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730 withval=$with_pymalloc;
10731fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010732
Neil Schemenauera35c6882001-02-27 04:45:05 +000010733
Neil Schemenauer16c22972002-03-22 15:34:49 +000010734if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010735then
10736 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010737fi
10738if test "$with_pymalloc" != "no"
10739then
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010742
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010743 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10746$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010747
Benjamin Peterson05159c42009-12-03 03:01:27 +000010748# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10750$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010751
10752# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010753if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010754 withval=$with_valgrind;
10755else
10756 with_valgrind=no
10757fi
10758
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10760$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010761if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 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 +020010763if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010766
10767else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010768 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010769
10770fi
10771
10772
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010773 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010774fi
10775
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010776# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010777
Guido van Rossum98935bf2001-09-05 19:13:16 +000010778DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010779
Guido van Rossume97ee181999-12-20 21:27:22 +000010780# the dlopen() function means we might want to use dynload_shlib.o. some
10781# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010782for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010783do :
10784 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010785if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010787#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010788_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010789
Guido van Rossume97ee181999-12-20 21:27:22 +000010790fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010791done
Guido van Rossume97ee181999-12-20 21:27:22 +000010792
Michael W. Hudson54241132001-12-07 15:38:26 +000010793
Guido van Rossume97ee181999-12-20 21:27:22 +000010794# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10795# loading of modules.
10796
Matthias Kloseb9621712010-04-24 17:59:49 +000010797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10798$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010799if test -z "$DYNLOADFILE"
10800then
10801 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010802 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10803 if test "$ac_cv_func_dlopen" = yes
10804 then DYNLOADFILE="dynload_shlib.o"
10805 else DYNLOADFILE="dynload_aix.o"
10806 fi
10807 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010808 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010809 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10810 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010811 *)
10812 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10813 # out any dynamic loading
10814 if test "$ac_cv_func_dlopen" = yes
10815 then DYNLOADFILE="dynload_shlib.o"
10816 else DYNLOADFILE="dynload_stub.o"
10817 fi
10818 ;;
10819 esac
10820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10822$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010823if test "$DYNLOADFILE" != "dynload_stub.o"
10824then
Martin v. Löwis11437992002-04-12 09:54:03 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010827
10828fi
10829
Neil Schemenauer4e425612001-06-19 15:44:15 +000010830# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10831
Michael W. Hudson54241132001-12-07 15:38:26 +000010832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10834$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010835if test -z "$MACHDEP_OBJS"
10836then
Jack Jansene578a632001-08-15 01:27:14 +000010837 MACHDEP_OBJS=$extra_machdep_objs
10838else
10839 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010840fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010841if test -z "$MACHDEP_OBJS"; then
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10843$as_echo "none" >&6; }
10844else
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10846$as_echo "$MACHDEP_OBJS" >&6; }
10847fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010848
Guido van Rossum627b2d71993-12-24 10:39:16 +000010849# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010850for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010851 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010852 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010853 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010854 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010855 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010856 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010857 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10858 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010859 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010860 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010861 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010862 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010863 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010864 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010865 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10866 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010867 sigaction sigaltstack siginterrupt sigpending sigrelse \
10868 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010869 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010870 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010871 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010872do :
10873 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10874ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010875if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010877#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010878_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010879
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010880fi
10881done
10882
Michael W. Hudson54241132001-12-07 15:38:26 +000010883
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010884ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10885 #include <dirent.h>
10886"
10887if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10888
10889$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10890
10891fi
10892
10893
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010894# For some functions, having a definition is not sufficient, since
10895# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10897$as_echo_n "checking for chroot... " >&6; }
10898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010900#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010901int
10902main ()
10903{
10904void *x=chroot
10905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010912
Matthias Kloseb159a552010-04-25 21:00:44 +000010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010918
10919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10922$as_echo_n "checking for link... " >&6; }
10923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010925#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010926int
10927main ()
10928{
10929void *x=link
10930 ;
10931 return 0;
10932}
10933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010934if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010937
Matthias Kloseb159a552010-04-25 21:00:44 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010939$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010940else
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10942$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010943
10944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10947$as_echo_n "checking for symlink... " >&6; }
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010950#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010951int
10952main ()
10953{
10954void *x=symlink
10955 ;
10956 return 0;
10957}
10958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010959if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010962
Matthias Kloseb159a552010-04-25 21:00:44 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010968
10969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10972$as_echo_n "checking for fchdir... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010975#include <unistd.h>
10976int
10977main ()
10978{
10979void *x=fchdir
10980 ;
10981 return 0;
10982}
10983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010987
Matthias Kloseb159a552010-04-25 21:00:44 +000010988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010990else
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10992$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010993
10994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10997$as_echo_n "checking for fsync... " >&6; }
10998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011000#include <unistd.h>
11001int
11002main ()
11003{
11004void *x=fsync
11005 ;
11006 return 0;
11007}
11008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011009if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011012
Matthias Kloseb159a552010-04-25 21:00:44 +000011013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011015else
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11017$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011018
11019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11022$as_echo_n "checking for fdatasync... " >&6; }
11023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011025#include <unistd.h>
11026int
11027main ()
11028{
11029void *x=fdatasync
11030 ;
11031 return 0;
11032}
11033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011037
Matthias Kloseb159a552010-04-25 21:00:44 +000011038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011043
11044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11047$as_echo_n "checking for epoll... " >&6; }
11048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011049/* end confdefs.h. */
11050#include <sys/epoll.h>
11051int
11052main ()
11053{
11054void *x=epoll_create
11055 ;
11056 return 0;
11057}
11058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011062
Matthias Kloseb159a552010-04-25 21:00:44 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011065else
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11067$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011068
11069fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11072$as_echo_n "checking for epoll_create1... " >&6; }
11073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11074/* end confdefs.h. */
11075#include <sys/epoll.h>
11076int
11077main ()
11078{
11079void *x=epoll_create1
11080 ;
11081 return 0;
11082}
11083_ACEOF
11084if ac_fn_c_try_compile "$LINENO"; then :
11085
11086$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11087
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11089$as_echo "yes" >&6; }
11090else
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
11093
11094fi
11095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11097$as_echo_n "checking for kqueue... " >&6; }
11098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011099/* end confdefs.h. */
11100
11101#include <sys/types.h>
11102#include <sys/event.h>
11103
11104int
11105main ()
11106{
11107int x=kqueue()
11108 ;
11109 return 0;
11110}
11111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011115
Matthias Kloseb159a552010-04-25 21:00:44 +000011116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011117$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11120$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011121
11122fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11125$as_echo_n "checking for prlimit... " >&6; }
11126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11127/* end confdefs.h. */
11128
11129#include <sys/time.h>
11130#include <sys/resource.h>
11131
11132int
11133main ()
11134{
11135void *x=prlimit
11136 ;
11137 return 0;
11138}
11139_ACEOF
11140if ac_fn_c_try_compile "$LINENO"; then :
11141
11142$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11143
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11145$as_echo "yes" >&6; }
11146else
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11148$as_echo "no" >&6; }
11149
11150fi
11151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11152
Martin v. Löwisd5843682002-11-21 20:41:28 +000011153# On some systems (eg. FreeBSD 5), we would find a definition of the
11154# functions ctermid_r, setgroups in the library, but no prototype
11155# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11156# address to avoid compiler warnings and potential miscompilations
11157# because of the missing prototypes.
11158
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11160$as_echo_n "checking for ctermid_r... " >&6; }
11161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011163
Martin v. Löwisd5843682002-11-21 20:41:28 +000011164#include <stdio.h>
11165
Martin v. Löwisd5843682002-11-21 20:41:28 +000011166int
11167main ()
11168{
11169void* p = ctermid_r
11170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011175
Matthias Kloseb9621712010-04-24 17:59:49 +000011176$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011177
Matthias Kloseb159a552010-04-25 21:00:44 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011180else
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011183
11184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11186
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11188$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011189if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011190 $as_echo_n "(cached) " >&6
11191else
11192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011193/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011194#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011195int
11196main ()
11197{
11198void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011199
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011200 ;
11201 return 0;
11202}
11203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011204if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011205 ac_cv_flock_decl=yes
11206else
11207 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011208
11209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011211
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011212fi
11213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11214$as_echo "$ac_cv_flock_decl" >&6; }
11215if test "x${ac_cv_flock_decl}" = xyes; then
11216 for ac_func in flock
11217do :
11218 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011219if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011220 cat >>confdefs.h <<_ACEOF
11221#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011222_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011223
Antoine Pitroua3000072010-09-07 14:52:42 +000011224else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011226$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011227if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011228 $as_echo_n "(cached) " >&6
11229else
11230 ac_check_lib_save_LIBS=$LIBS
11231LIBS="-lbsd $LIBS"
11232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11233/* end confdefs.h. */
11234
11235/* Override any GCC internal prototype to avoid an error.
11236 Use char because int might match the return type of a GCC
11237 builtin and then its argument prototype would still apply. */
11238#ifdef __cplusplus
11239extern "C"
11240#endif
11241char flock ();
11242int
11243main ()
11244{
11245return flock ();
11246 ;
11247 return 0;
11248}
11249_ACEOF
11250if ac_fn_c_try_link "$LINENO"; then :
11251 ac_cv_lib_bsd_flock=yes
11252else
11253 ac_cv_lib_bsd_flock=no
11254fi
11255rm -f core conftest.err conftest.$ac_objext \
11256 conftest$ac_exeext conftest.$ac_ext
11257LIBS=$ac_check_lib_save_LIBS
11258fi
11259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11260$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011261if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011262 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011263
11264
11265$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11266
11267
11268fi
11269
11270
11271fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011272done
11273
Antoine Pitroua3000072010-09-07 14:52:42 +000011274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11277$as_echo_n "checking for getpagesize... " >&6; }
11278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011279/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011280
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011281#include <unistd.h>
11282
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011283int
11284main ()
11285{
11286void* p = getpagesize
11287 ;
11288 return 0;
11289}
11290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011294
Matthias Kloseb159a552010-04-25 21:00:44 +000011295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011297else
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011300
11301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011303
Victor Stinner984890f2011-11-24 13:53:38 +010011304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11305$as_echo_n "checking for broken unsetenv... " >&6; }
11306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307/* end confdefs.h. */
11308
11309#include <stdlib.h>
11310
11311int
11312main ()
11313{
11314int res = unsetenv("DUMMY")
11315 ;
11316 return 0;
11317}
11318_ACEOF
11319if ac_fn_c_try_compile "$LINENO"; then :
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
11322else
11323
11324$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11325
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11327$as_echo "yes" >&6; }
11328
11329fi
11330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11331
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011332for ac_prog in true
11333do
11334 # Extract the first word of "$ac_prog", so it can be a program name with args.
11335set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11337$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011338if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011340else
11341 if test -n "$TRUE"; then
11342 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11343else
11344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11345for as_dir in $PATH
11346do
11347 IFS=$as_save_IFS
11348 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011351 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 $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 +000011353 break 2
11354 fi
11355done
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011358
11359fi
11360fi
11361TRUE=$ac_cv_prog_TRUE
11362if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11364$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011368fi
11369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011371 test -n "$TRUE" && break
11372done
11373test -n "$TRUE" || TRUE="/bin/true"
11374
11375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11377$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011378if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011380else
11381 ac_check_lib_save_LIBS=$LIBS
11382LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386/* Override any GCC internal prototype to avoid an error.
11387 Use char because int might match the return type of a GCC
11388 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011389#ifdef __cplusplus
11390extern "C"
11391#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011392char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011393int
11394main ()
11395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011402 ac_cv_lib_c_inet_aton=yes
11403else
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011406rm -f core conftest.err conftest.$ac_objext \
11407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011408LIBS=$ac_check_lib_save_LIBS
11409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11411$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011412if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011413 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011414else
Matthias Kloseb9621712010-04-24 17:59:49 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11416$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011417if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011419else
11420 ac_check_lib_save_LIBS=$LIBS
11421LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011423/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425/* Override any GCC internal prototype to avoid an error.
11426 Use char because int might match the return type of a GCC
11427 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011428#ifdef __cplusplus
11429extern "C"
11430#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011431char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011432int
11433main ()
11434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011436 ;
11437 return 0;
11438}
11439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011441 ac_cv_lib_resolv_inet_aton=yes
11442else
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011445rm -f core conftest.err conftest.$ac_objext \
11446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011447LIBS=$ac_check_lib_save_LIBS
11448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11450$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011451if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011452 cat >>confdefs.h <<_ACEOF
11453#define HAVE_LIBRESOLV 1
11454_ACEOF
11455
11456 LIBS="-lresolv $LIBS"
11457
11458fi
11459
11460
11461fi
11462
11463
Christian Heimesd0764e22007-12-04 15:00:33 +000011464# On Tru64, chflags seems to be present, but calling it will
11465# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11467$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011468if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011470else
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011472 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011475/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011476
Christian Heimesd0764e22007-12-04 15:00:33 +000011477#include <sys/stat.h>
11478#include <unistd.h>
11479int main(int argc, char*argv[])
11480{
11481 if(chflags(argv[0], 0) != 0)
11482 return 1;
11483 return 0;
11484}
Ned Deily3eb67d52011-06-28 00:00:28 -070011485
Christian Heimesd0764e22007-12-04 15:00:33 +000011486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011487if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011488 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011489else
Matthias Kloseb9621712010-04-24 17:59:49 +000011490 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011494fi
11495
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011496
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11499$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011500if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011502if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011503 ac_cv_have_chflags="yes"
11504else
11505 ac_cv_have_chflags="no"
11506fi
11507
11508fi
11509if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011510
Matthias Kloseb9621712010-04-24 17:59:49 +000011511$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011512
11513fi
11514
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11516$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011517if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011519else
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011521 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011522else
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011524/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011525
Christian Heimesd0764e22007-12-04 15:00:33 +000011526#include <sys/stat.h>
11527#include <unistd.h>
11528int main(int argc, char*argv[])
11529{
11530 if(lchflags(argv[0], 0) != 0)
11531 return 1;
11532 return 0;
11533}
Ned Deily3eb67d52011-06-28 00:00:28 -070011534
Christian Heimesd0764e22007-12-04 15:00:33 +000011535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011536if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011537 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011538else
Matthias Kloseb9621712010-04-24 17:59:49 +000011539 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11542 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011543fi
11544
11545
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11548$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011549if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011551if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011552 ac_cv_have_lchflags="yes"
11553else
11554 ac_cv_have_lchflags="no"
11555fi
11556
11557fi
11558if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011561
11562fi
11563
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011564case $ac_sys_system/$ac_sys_release in
11565Darwin/*)
11566 _CUR_CFLAGS="${CFLAGS}"
11567 _CUR_LDFLAGS="${LDFLAGS}"
11568 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11569 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11570 ;;
11571esac
11572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11574$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011575if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011577else
11578 ac_check_lib_save_LIBS=$LIBS
11579LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011581/* end confdefs.h. */
11582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583/* Override any GCC internal prototype to avoid an error.
11584 Use char because int might match the return type of a GCC
11585 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011586#ifdef __cplusplus
11587extern "C"
11588#endif
11589char inflateCopy ();
11590int
11591main ()
11592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011594 ;
11595 return 0;
11596}
11597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011598if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011599 ac_cv_lib_z_inflateCopy=yes
11600else
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011603rm -f core conftest.err conftest.$ac_objext \
11604 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011605LIBS=$ac_check_lib_save_LIBS
11606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11608$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011612
11613fi
11614
11615
11616case $ac_sys_system/$ac_sys_release in
11617Darwin/*)
11618 CFLAGS="${_CUR_CFLAGS}"
11619 LDFLAGS="${_CUR_LDFLAGS}"
11620 ;;
11621esac
11622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11624$as_echo_n "checking for hstrerror... " >&6; }
11625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011626/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011627
Martin v. Löwise9416172003-05-03 10:12:45 +000011628#include <netdb.h>
11629
Martin v. Löwise9416172003-05-03 10:12:45 +000011630int
11631main ()
11632{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011633void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011634 ;
11635 return 0;
11636}
11637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011641
Matthias Kloseb159a552010-04-25 21:00:44 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011644else
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11646$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011647
11648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011649rm -f core conftest.err conftest.$ac_objext \
11650 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11653$as_echo_n "checking for inet_aton... " >&6; }
11654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011656
Martin v. Löwis86d66262006-02-17 08:40:11 +000011657#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011658#include <sys/socket.h>
11659#include <netinet/in.h>
11660#include <arpa/inet.h>
11661
Martin v. Löwise9416172003-05-03 10:12:45 +000011662int
11663main ()
11664{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011665void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011666 ;
11667 return 0;
11668}
11669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011673
Matthias Kloseb159a552010-04-25 21:00:44 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11678$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011679
11680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011681rm -f core conftest.err conftest.$ac_objext \
11682 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11685$as_echo_n "checking for inet_pton... " >&6; }
11686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011687/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011688
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011689#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011690#include <sys/socket.h>
11691#include <netinet/in.h>
11692#include <arpa/inet.h>
11693
Martin v. Löwise9416172003-05-03 10:12:45 +000011694int
11695main ()
11696{
11697void* p = inet_pton
11698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011705
Matthias Kloseb159a552010-04-25 21:00:44 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011711
11712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011714
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011715# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11717$as_echo_n "checking for setgroups... " >&6; }
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011719/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011720
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011721#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011722#ifdef HAVE_GRP_H
11723#include <grp.h>
11724#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011725
Martin v. Löwisd5843682002-11-21 20:41:28 +000011726int
11727main ()
11728{
11729void* p = setgroups
11730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011737
Matthias Kloseb159a552010-04-25 21:00:44 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011743
11744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011746
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011747# check for openpty and forkpty
11748
11749for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011750do :
11751 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011752if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011754#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011755_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011756
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11759$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011760if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011762else
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011764LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011768/* Override any GCC internal prototype to avoid an error.
11769 Use char because int might match the return type of a GCC
11770 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011771#ifdef __cplusplus
11772extern "C"
11773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011774char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011775int
11776main ()
11777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 ;
11780 return 0;
11781}
11782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011783if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011788rm -f core conftest.err conftest.$ac_objext \
11789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011790LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11793$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011794if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011796 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11799$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011802else
11803 ac_check_lib_save_LIBS=$LIBS
11804LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011806/* end confdefs.h. */
11807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011808/* Override any GCC internal prototype to avoid an error.
11809 Use char because int might match the return type of a GCC
11810 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011811#ifdef __cplusplus
11812extern "C"
11813#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011814char openpty ();
11815int
11816main ()
11817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011819 ;
11820 return 0;
11821}
11822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011824 ac_cv_lib_bsd_openpty=yes
11825else
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011828rm -f core conftest.err conftest.$ac_objext \
11829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011830LIBS=$ac_check_lib_save_LIBS
11831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11833$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011834if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011836 LIBS="$LIBS -lbsd"
11837fi
11838
11839
11840fi
11841
Fred Drake8cef4cf2000-06-28 16:40:38 +000011842
11843fi
11844done
11845
11846for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011847do :
11848 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011849if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011852_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011853
Fred Drake8cef4cf2000-06-28 16:40:38 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11856$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011859else
Martin v. Löwis11437992002-04-12 09:54:03 +000011860 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011861LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865/* Override any GCC internal prototype to avoid an error.
11866 Use char because int might match the return type of a GCC
11867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011868#ifdef __cplusplus
11869extern "C"
11870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011871char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011872int
11873main ()
11874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011875return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011881 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core conftest.err conftest.$ac_objext \
11886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011887LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11890$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011891if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011893 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11896$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011899else
11900 ac_check_lib_save_LIBS=$LIBS
11901LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011903/* end confdefs.h. */
11904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011905/* Override any GCC internal prototype to avoid an error.
11906 Use char because int might match the return type of a GCC
11907 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011908#ifdef __cplusplus
11909extern "C"
11910#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011911char forkpty ();
11912int
11913main ()
11914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011916 ;
11917 return 0;
11918}
11919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011921 ac_cv_lib_bsd_forkpty=yes
11922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011925rm -f core conftest.err conftest.$ac_objext \
11926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011927LIBS=$ac_check_lib_save_LIBS
11928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11930$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011931if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011933 LIBS="$LIBS -lbsd"
11934fi
11935
11936
11937fi
11938
Fred Drake8cef4cf2000-06-28 16:40:38 +000011939
11940fi
11941done
11942
Jack Jansendd19cf82001-12-06 22:36:17 +000011943
Christian Heimesb186d002008-03-18 15:15:01 +000011944# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011945for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011946do :
11947 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011949 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011950#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011951_ACEOF
11952
11953fi
11954done
11955
11956
Michael W. Hudson54241132001-12-07 15:38:26 +000011957# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011958for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011959do :
11960 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11961ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011962if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011965_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011967fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011968done
11969
Michael W. Hudson54241132001-12-07 15:38:26 +000011970
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011971ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011973 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011974
Martin v. Löwis1142de32002-03-29 16:28:31 +000011975else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011976 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011977 *" dup2.$ac_objext "* ) ;;
11978 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011980esac
11981
Martin v. Löwis1142de32002-03-29 16:28:31 +000011982fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011983
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011984ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011986 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11987
11988else
11989 case " $LIBOBJS " in
11990 *" strdup.$ac_objext "* ) ;;
11991 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11992 ;;
11993esac
11994
11995fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011996
11997
11998for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011999do :
12000 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012003#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012006/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012007#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012008int
12009main ()
12010{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 ;
12013 return 0;
12014}
12015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012019
Guido van Rossum627b2d71993-12-24 10:39:16 +000012020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012022
Guido van Rossum627b2d71993-12-24 10:39:16 +000012023fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012024done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012025
Jack Jansen150753c2003-03-29 22:07:47 +000012026for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012027do :
12028 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012030 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012034/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012035#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012036int
12037main ()
12038{
12039setpgrp(0,0);
12040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012047
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012050
12051fi
12052done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012053
Thomas Wouters3a584202000-08-05 23:28:51 +000012054for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012055do :
12056 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012057if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012059#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012063#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012064int
12065main ()
12066{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 ;
12069 return 0;
12070}
12071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072if ac_fn_c_try_compile "$LINENO"; then :
12073
Guido van Rossum627b2d71993-12-24 10:39:16 +000012074else
Skip Montanaro6dead952003-09-25 14:50:04 +000012075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Guido van Rossum627b2d71993-12-24 10:39:16 +000012079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012083done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084
Michael W. Hudson54241132001-12-07 15:38:26 +000012085
Victor Stinnere0be4232011-10-25 13:06:09 +020012086for ac_func in clock_gettime
12087do :
12088 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12089if test "x$ac_cv_func_clock_gettime" = xyes; then :
12090 cat >>confdefs.h <<_ACEOF
12091#define HAVE_CLOCK_GETTIME 1
12092_ACEOF
12093
12094else
12095
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12097$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12098if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12099 $as_echo_n "(cached) " >&6
12100else
12101 ac_check_lib_save_LIBS=$LIBS
12102LIBS="-lrt $LIBS"
12103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12104/* end confdefs.h. */
12105
12106/* Override any GCC internal prototype to avoid an error.
12107 Use char because int might match the return type of a GCC
12108 builtin and then its argument prototype would still apply. */
12109#ifdef __cplusplus
12110extern "C"
12111#endif
12112char clock_gettime ();
12113int
12114main ()
12115{
12116return clock_gettime ();
12117 ;
12118 return 0;
12119}
12120_ACEOF
12121if ac_fn_c_try_link "$LINENO"; then :
12122 ac_cv_lib_rt_clock_gettime=yes
12123else
12124 ac_cv_lib_rt_clock_gettime=no
12125fi
12126rm -f core conftest.err conftest.$ac_objext \
12127 conftest$ac_exeext conftest.$ac_ext
12128LIBS=$ac_check_lib_save_LIBS
12129fi
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12131$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12132if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12133
Victor Stinner7efb8332014-08-29 15:41:08 +020012134 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012135 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12136
12137
12138$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12139
12140
12141fi
12142
12143
12144fi
12145done
12146
12147
12148for ac_func in clock_getres
12149do :
12150 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12151if test "x$ac_cv_func_clock_getres" = xyes; then :
12152 cat >>confdefs.h <<_ACEOF
12153#define HAVE_CLOCK_GETRES 1
12154_ACEOF
12155
12156else
12157
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12159$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12160if ${ac_cv_lib_rt_clock_getres+:} false; then :
12161 $as_echo_n "(cached) " >&6
12162else
12163 ac_check_lib_save_LIBS=$LIBS
12164LIBS="-lrt $LIBS"
12165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12166/* end confdefs.h. */
12167
12168/* Override any GCC internal prototype to avoid an error.
12169 Use char because int might match the return type of a GCC
12170 builtin and then its argument prototype would still apply. */
12171#ifdef __cplusplus
12172extern "C"
12173#endif
12174char clock_getres ();
12175int
12176main ()
12177{
12178return clock_getres ();
12179 ;
12180 return 0;
12181}
12182_ACEOF
12183if ac_fn_c_try_link "$LINENO"; then :
12184 ac_cv_lib_rt_clock_getres=yes
12185else
12186 ac_cv_lib_rt_clock_getres=no
12187fi
12188rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext conftest.$ac_ext
12190LIBS=$ac_check_lib_save_LIBS
12191fi
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12193$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12194if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12195
12196 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12197
12198
12199fi
12200
12201
12202fi
12203done
12204
12205
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12207$as_echo_n "checking for major... " >&6; }
12208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012210
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012211#if defined(MAJOR_IN_MKDEV)
12212#include <sys/mkdev.h>
12213#elif defined(MAJOR_IN_SYSMACROS)
12214#include <sys/sysmacros.h>
12215#else
12216#include <sys/types.h>
12217#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012218
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012219int
12220main ()
12221{
12222
12223 makedev(major(0),minor(0));
12224
12225 ;
12226 return 0;
12227}
12228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012230
12231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012233
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12235$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012236
12237else
Skip Montanaro6dead952003-09-25 14:50:04 +000012238
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012241
12242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012243rm -f core conftest.err conftest.$ac_objext \
12244 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012245
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012246# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012247# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12249$as_echo_n "checking for getaddrinfo... " >&6; }
12250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012252
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012253#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012254#include <sys/socket.h>
12255#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012256#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012257
Martin v. Löwis11437992002-04-12 09:54:03 +000012258int
12259main ()
12260{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012261getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012267 have_getaddrinfo=yes
12268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271rm -f core conftest.err conftest.$ac_objext \
12272 conftest$ac_exeext conftest.$ac_ext
12273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12274$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012275if test $have_getaddrinfo = yes
12276then
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12278$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012279 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012283
12284if test "${enable_ipv6+set}" = set; then
12285 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12286else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012287 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012288fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012291/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012292
Stefan Krah19c21392012-11-22 23:47:32 +010012293#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012294#include <sys/types.h>
12295#include <netdb.h>
12296#include <string.h>
12297#include <sys/socket.h>
12298#include <netinet/in.h>
12299
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012300int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012301{
12302 int passive, gaierr, inet4 = 0, inet6 = 0;
12303 struct addrinfo hints, *ai, *aitop;
12304 char straddr[INET6_ADDRSTRLEN], strport[16];
12305
12306 for (passive = 0; passive <= 1; passive++) {
12307 memset(&hints, 0, sizeof(hints));
12308 hints.ai_family = AF_UNSPEC;
12309 hints.ai_flags = passive ? AI_PASSIVE : 0;
12310 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012311 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012312 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12313 (void)gai_strerror(gaierr);
12314 goto bad;
12315 }
12316 for (ai = aitop; ai; ai = ai->ai_next) {
12317 if (ai->ai_addr == NULL ||
12318 ai->ai_addrlen == 0 ||
12319 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12320 straddr, sizeof(straddr), strport, sizeof(strport),
12321 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12322 goto bad;
12323 }
12324 switch (ai->ai_family) {
12325 case AF_INET:
12326 if (strcmp(strport, "54321") != 0) {
12327 goto bad;
12328 }
12329 if (passive) {
12330 if (strcmp(straddr, "0.0.0.0") != 0) {
12331 goto bad;
12332 }
12333 } else {
12334 if (strcmp(straddr, "127.0.0.1") != 0) {
12335 goto bad;
12336 }
12337 }
12338 inet4++;
12339 break;
12340 case AF_INET6:
12341 if (strcmp(strport, "54321") != 0) {
12342 goto bad;
12343 }
12344 if (passive) {
12345 if (strcmp(straddr, "::") != 0) {
12346 goto bad;
12347 }
12348 } else {
12349 if (strcmp(straddr, "::1") != 0) {
12350 goto bad;
12351 }
12352 }
12353 inet6++;
12354 break;
12355 case AF_UNSPEC:
12356 goto bad;
12357 break;
12358 default:
12359 /* another family support? */
12360 break;
12361 }
12362 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012363 freeaddrinfo(aitop);
12364 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012365 }
12366
12367 if (!(inet4 == 0 || inet4 == 2))
12368 goto bad;
12369 if (!(inet6 == 0 || inet6 == 2))
12370 goto bad;
12371
12372 if (aitop)
12373 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012374 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012375
12376 bad:
12377 if (aitop)
12378 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012379 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012380}
12381
Martin v. Löwis11437992002-04-12 09:54:03 +000012382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012383if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012384 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385else
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012392fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12397$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12398
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012399if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012400then
12401 if test $ipv6 = yes
12402 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403 echo 'Fatal: You must get working getaddrinfo() function.'
12404 echo ' or you can specify "--disable-ipv6"'.
12405 exit 1
12406 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012407else
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012410
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012412
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012413for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012414do :
12415 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012416if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012418#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012419_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012420
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421fi
12422done
12423
Michael W. Hudson54241132001-12-07 15:38:26 +000012424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12427$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012428if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433#include <sys/types.h>
12434#include <sys/time.h>
12435#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Martin v. Löwis11437992002-04-12 09:54:03 +000012437int
12438main ()
12439{
12440if ((struct tm *) 0)
12441return 0;
12442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012447 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448else
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12454$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012455if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Matthias Kloseb9621712010-04-24 17:59:49 +000012457$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458
12459fi
12460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12462$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465else
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468#include <sys/types.h>
12469#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474struct tm tm;
12475 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482 ac_cv_struct_tm=time.h
12483else
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12489$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012490if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493
12494fi
12495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496ac_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 +000012497#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Matthias Kloseb9621712010-04-24 17:59:49 +000012499"
Victor Stinnere0be4232011-10-25 13:06:09 +020012500if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
12502cat >>confdefs.h <<_ACEOF
12503#define HAVE_STRUCT_TM_TM_ZONE 1
12504_ACEOF
12505
12506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012507fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12510
Matthias Kloseb9621712010-04-24 17:59:49 +000012511$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512
12513else
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12515"
Victor Stinnere0be4232011-10-25 13:06:09 +020012516if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520fi
12521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012523#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524_ACEOF
12525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12527$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012528if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012532/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012533#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534#if !HAVE_DECL_TZNAME
12535extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012537
Martin v. Löwis11437992002-04-12 09:54:03 +000012538int
12539main ()
12540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 ;
12543 return 0;
12544}
12545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012546if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012547 ac_cv_var_tzname=yes
12548else
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012551rm -f core conftest.err conftest.$ac_objext \
12552 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12555$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012556 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
Matthias Kloseb9621712010-04-24 17:59:49 +000012558$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560 fi
12561fi
12562
Matthias Kloseb9621712010-04-24 17:59:49 +000012563ac_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 +020012564if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
12566cat >>confdefs.h <<_ACEOF
12567#define HAVE_STRUCT_STAT_ST_RDEV 1
12568_ACEOF
12569
12570
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012571fi
12572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573ac_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 +020012574if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012575
Martin v. Löwis11437992002-04-12 09:54:03 +000012576cat >>confdefs.h <<_ACEOF
12577#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12578_ACEOF
12579
12580
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012581fi
12582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583ac_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 +020012584if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012585
12586cat >>confdefs.h <<_ACEOF
12587#define HAVE_STRUCT_STAT_ST_FLAGS 1
12588_ACEOF
12589
12590
12591fi
12592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593ac_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 +020012594if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012595
12596cat >>confdefs.h <<_ACEOF
12597#define HAVE_STRUCT_STAT_ST_GEN 1
12598_ACEOF
12599
12600
12601fi
12602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603ac_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 +020012604if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012605
12606cat >>confdefs.h <<_ACEOF
12607#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12608_ACEOF
12609
12610
12611fi
12612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613ac_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 +020012614if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012615
Martin v. Löwis11437992002-04-12 09:54:03 +000012616cat >>confdefs.h <<_ACEOF
12617#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12618_ACEOF
12619
12620
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012621fi
12622
Stefan Krah267b6392016-04-26 01:09:18 +020012623ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12624 #include <sys/types.h>
12625 #include <pwd.h>
12626
12627"
12628if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12629
12630cat >>confdefs.h <<_ACEOF
12631#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12632_ACEOF
12633
12634
12635fi
12636ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12637 #include <sys/types.h>
12638 #include <pwd.h>
12639
12640"
12641if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12642
12643cat >>confdefs.h <<_ACEOF
12644#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12645_ACEOF
12646
12647
12648fi
12649
Michael W. Hudson54241132001-12-07 15:38:26 +000012650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12652$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012653if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655else
Matthias Kloseb159a552010-04-25 21:00:44 +000012656
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012659#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 ;
12665 return 0;
12666}
12667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669 ac_cv_header_time_altzone=yes
12670else
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675fi
12676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12678$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682
12683fi
12684
Guido van Rossumda88dad1995-01-26 00:46:29 +000012685was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12687$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012689/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012690
12691#include <sys/types.h>
12692#include <sys/select.h>
12693#include <sys/time.h>
12694
Martin v. Löwis11437992002-04-12 09:54:03 +000012695int
12696main ()
12697{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698;
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ;
12700 return 0;
12701}
12702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
12705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012708 was_it_defined=yes
12709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12713$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12716$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012717if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719else
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012722#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012723int
12724main ()
12725{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012726struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ;
12728 return 0;
12729}
12730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012732 ac_cv_struct_addrinfo=yes
12733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12737fi
12738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12740$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012744
12745fi
12746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12748$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012749if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012753/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754
12755# include <sys/types.h>
12756# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ;
12762 return 0;
12763}
12764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012766 ac_cv_struct_sockaddr_storage=yes
12767else
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12771fi
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12774$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778
12779fi
12780
Christian Heimesdffa3942016-09-05 23:54:41 +020012781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12782$as_echo_n "checking for sockaddr_alg... " >&6; }
12783if ${ac_cv_struct_sockaddr_alg+:} false; then :
12784 $as_echo_n "(cached) " >&6
12785else
12786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12787/* end confdefs.h. */
12788
12789# include <sys/types.h>
12790# include <sys/socket.h>
12791# include <linux/if_alg.h>
12792int
12793main ()
12794{
12795struct sockaddr_alg s
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800if ac_fn_c_try_compile "$LINENO"; then :
12801 ac_cv_struct_sockaddr_alg=yes
12802else
12803 ac_cv_struct_sockaddr_alg=no
12804fi
12805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12806fi
12807
12808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12809$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12810if test $ac_cv_struct_sockaddr_alg = yes; then
12811
12812$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12813
12814fi
12815
Guido van Rossum627b2d71993-12-24 10:39:16 +000012816# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12819$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012820if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012822else
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012826int
12827main ()
12828{
12829static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012830test_array [0] = 0;
12831return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
12833 ;
12834 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012835}
Martin v. Löwis11437992002-04-12 09:54:03 +000012836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012838 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12845$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012848
12849fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12852$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012853if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012855else
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012862
Martin v. Löwis11437992002-04-12 09:54:03 +000012863#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012864 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012866 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012867 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868 char const *const *pcpcc;
12869 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 /* NEC SVR4.0.2 mips cc rejects this. */
12871 struct point {int x, y;};
12872 static struct point const zero = {0,0};
12873 /* AIX XL C 1.02.0.0 rejects this.
12874 It does not let you subtract one const X* pointer from another in
12875 an arm of an if-expression whose if-part is not a constant
12876 expression */
12877 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880 ++pcpcc;
12881 ppc = (char**) pcpcc;
12882 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012883 { /* SCO 3.2v4 cc rejects this sort of thing. */
12884 char tx;
12885 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 }
12891 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12892 int x[] = {25, 17};
12893 const int *foo = &x[0];
12894 ++foo;
12895 }
12896 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12897 typedef const int *iptr;
12898 iptr p = 0;
12899 ++p;
12900 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012901 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012903 struct s { int j; const int *ap[3]; } bx;
12904 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 }
12906 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12907 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012911#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012912
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ;
12914 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012915}
Martin v. Löwis11437992002-04-12 09:54:03 +000012916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918 ac_cv_c_const=yes
12919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12925$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929
12930fi
12931
Michael W. Hudson54241132001-12-07 15:38:26 +000012932
Guido van Rossumda88dad1995-01-26 00:46:29 +000012933works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12935$as_echo_n "checking for working volatile... " >&6; }
12936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012937/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012938
Martin v. Löwis11437992002-04-12 09:54:03 +000012939int
12940main ()
12941{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ;
12944 return 0;
12945}
12946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012948 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012949else
Skip Montanaro6dead952003-09-25 14:50:04 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012952
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012953
Guido van Rossum627b2d71993-12-24 10:39:16 +000012954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12957$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012958
Guido van Rossumda88dad1995-01-26 00:46:29 +000012959works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12961$as_echo_n "checking for working signed char... " >&6; }
12962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965int
12966main ()
12967{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012974 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012975else
Skip Montanaro6dead952003-09-25 14:50:04 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012978
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012979
Guido van Rossum7f43da71994-08-01 12:15:30 +000012980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12983$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012984
Guido van Rossumda88dad1995-01-26 00:46:29 +000012985have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12987$as_echo_n "checking for prototypes... " >&6; }
12988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012989/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012990int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012991int
12992main ()
12993{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 ;
12996 return 0;
12997}
12998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Matthias Kloseb159a552010-04-25 21:00:44 +000013003 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13007$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013008
Guido van Rossumda88dad1995-01-26 00:46:29 +000013009works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13011$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013013/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013014
13015#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013016int foo(int x, ...) {
13017 va_list va;
13018 va_start(va, x);
13019 va_arg(va, int);
13020 va_arg(va, char *);
13021 va_arg(va, double);
13022 return 0;
13023}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025int
13026main ()
13027{
Guido van Rossum90eea071996-08-30 20:58:57 +000013028return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 ;
13030 return 0;
13031}
13032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013034
13035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013038 works=yes
13039
Guido van Rossum627b2d71993-12-24 10:39:16 +000013040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13043$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044
Martin v. Löwisd6320502004-08-12 13:45:08 +000013045# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13047$as_echo_n "checking for socketpair... " >&6; }
13048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013049/* end confdefs.h. */
13050
13051#include <sys/types.h>
13052#include <sys/socket.h>
13053
13054int
13055main ()
13056{
13057void *x=socketpair
13058 ;
13059 return 0;
13060}
13061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013065
Matthias Kloseb159a552010-04-25 21:00:44 +000013066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013067$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13070$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013071
13072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013074
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13077$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013079/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013080#include <sys/types.h>
13081#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013082int
13083main ()
13084{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013085struct sockaddr x;
13086x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 ;
13088 return 0;
13089}
13090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if ac_fn_c_try_compile "$LINENO"; then :
13092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13093$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013096
13097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013100
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013103
Guido van Rossumda88dad1995-01-26 00:46:29 +000013104va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13106$as_echo_n "checking whether va_list is an array... " >&6; }
13107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013109
13110#ifdef HAVE_STDARG_PROTOTYPES
13111#include <stdarg.h>
13112#else
13113#include <varargs.h>
13114#endif
13115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116int
13117main ()
13118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_compile "$LINENO"; then :
13125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013126else
Skip Montanaro6dead952003-09-25 14:50:04 +000013127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013130
Guido van Rossumda88dad1995-01-26 00:46:29 +000013131 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13136$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013138# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013142if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13147$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013148 OLD_CFLAGS=$CFLAGS
13149 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013151/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013152
13153# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155int
13156main ()
13157{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013158
13159 char *name;
13160 struct hostent *he, *res;
13161 char buffer[2048];
13162 int buflen = 2048;
13163 int h_errnop;
13164
13165 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
13167 ;
13168 return 0;
13169}
13170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013174
Martin v. Löwis11437992002-04-12 09:54:03 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13179$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013181else
Skip Montanaro6dead952003-09-25 14:50:04 +000013182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13184$as_echo "no" >&6; }
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13186$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013188/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013189
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013190# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Martin v. Löwis11437992002-04-12 09:54:03 +000013192int
13193main ()
13194{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013195
13196 char *name;
13197 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013198 char buffer[2048];
13199 int buflen = 2048;
13200 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013201
Matthias Kloseb159a552010-04-25 21:00:44 +000013202 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
13204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Matthias Kloseb159a552010-04-25 21:00:44 +000013213$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13216$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013217
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013218else
Skip Montanaro6dead952003-09-25 14:50:04 +000013219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13221$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13223$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13225/* end confdefs.h. */
13226
13227# include <netdb.h>
13228
13229int
13230main ()
13231{
13232
13233 char *name;
13234 struct hostent *he;
13235 struct hostent_data data;
13236
13237 (void) gethostbyname_r(name, he, &data);
13238
13239 ;
13240 return 0;
13241}
13242_ACEOF
13243if ac_fn_c_try_compile "$LINENO"; then :
13244
13245 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13246
13247
13248$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13249
13250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13251$as_echo "yes" >&6; }
13252
13253else
13254
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13256$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013260
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013266 CFLAGS=$OLD_CFLAGS
13267
13268else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 for ac_func in gethostbyname
13271do :
13272 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013273if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013275#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013276_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013277
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013278fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013279done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013280
Michael W. Hudson54241132001-12-07 15:38:26 +000013281
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013282fi
13283
Michael W. Hudson54241132001-12-07 15:38:26 +000013284
13285
13286
13287
13288
13289
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290# checks for system services
13291# (none yet)
13292
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013294ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013295if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013296
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13299$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013300if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302else
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013304LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308/* Override any GCC internal prototype to avoid an error.
13309 Use char because int might match the return type of a GCC
13310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013311#ifdef __cplusplus
13312extern "C"
13313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013314char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013315int
13316main ()
13317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013318return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 ;
13320 return 0;
13321}
13322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013328rm -f core conftest.err conftest.$ac_objext \
13329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013330LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13333$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013334if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 cat >>confdefs.h <<_ACEOF
13336#define HAVE_LIBIEEE 1
13337_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013339 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340
Guido van Rossum627b2d71993-12-24 10:39:16 +000013341fi
13342
Michael W. Hudson54241132001-12-07 15:38:26 +000013343
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013344fi
13345
Michael W. Hudson54241132001-12-07 15:38:26 +000013346
Guido van Rossum7f253911997-05-09 02:42:48 +000013347# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13349$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013352if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013354if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013355then
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13360$as_echo "yes" >&6; }
13361else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13362$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013363fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13366$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367fi
13368
Guido van Rossum7f253911997-05-09 02:42:48 +000013369
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370# check for --with-libm=...
13371
Guido van Rossum563e7081996-09-10 18:20:48 +000013372case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013373Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013374*) LIBM=-lm
13375esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13377$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013382if test "$withval" = no
13383then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13385$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013386elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013387then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13389$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013390else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013391fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13394$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395fi
13396
Guido van Rossum7f43da71994-08-01 12:15:30 +000013397
13398# check for --with-libc=...
13399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13401$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013406if test "$withval" = no
13407then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13409$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013410elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013411then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13413$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013414else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013415fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13418$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419fi
13420
Guido van Rossum7f43da71994-08-01 12:15:30 +000013421
Stefan Krah1919b7e2012-03-21 18:25:23 +010013422# **************************************
13423# * Check for gcc x64 inline assembler *
13424# **************************************
13425
13426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13427$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429/* end confdefs.h. */
13430
13431int
13432main ()
13433{
13434
13435 __asm__ __volatile__ ("movq %rcx, %rax");
13436
13437 ;
13438 return 0;
13439}
13440_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013441if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013442 have_gcc_asm_for_x64=yes
13443else
13444 have_gcc_asm_for_x64=no
13445fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013446rm -f core conftest.err conftest.$ac_objext \
13447 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13449$as_echo "$have_gcc_asm_for_x64" >&6; }
13450if test "$have_gcc_asm_for_x64" = yes
13451then
13452
13453$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13454
13455fi
13456
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013457# **************************************************
13458# * Check for various properties of floating point *
13459# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13462$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013463if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013465else
13466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013468 ac_cv_little_endian_double=no
13469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013471/* end confdefs.h. */
13472
13473#include <string.h>
13474int main() {
13475 double x = 9006104071832581.0;
13476 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13477 return 0;
13478 else
13479 return 1;
13480}
13481
13482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013484 ac_cv_little_endian_double=yes
13485else
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013490fi
13491
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013492fi
13493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13495$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013496if test "$ac_cv_little_endian_double" = yes
13497then
13498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013500
13501fi
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13504$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013505if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013507else
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013510 ac_cv_big_endian_double=no
13511else
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013513/* end confdefs.h. */
13514
13515#include <string.h>
13516int main() {
13517 double x = 9006104071832581.0;
13518 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13519 return 0;
13520 else
13521 return 1;
13522}
13523
13524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013525if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013526 ac_cv_big_endian_double=yes
13527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013532fi
13533
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013534fi
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13537$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013538if test "$ac_cv_big_endian_double" = yes
13539then
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013542
13543fi
13544
13545# Some ARM platforms use a mixed-endian representation for doubles.
13546# While Python doesn't currently have full support for these platforms
13547# (see e.g., issue 1762561), we can at least make sure that float <-> string
13548# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13550$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013551if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013553else
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013556 ac_cv_mixed_endian_double=no
13557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013559/* end confdefs.h. */
13560
13561#include <string.h>
13562int main() {
13563 double x = 9006104071832581.0;
13564 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13565 return 0;
13566 else
13567 return 1;
13568}
13569
13570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013571if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013572 ac_cv_mixed_endian_double=yes
13573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013578fi
13579
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013580fi
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13583$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013584if test "$ac_cv_mixed_endian_double" = yes
13585then
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013588
13589fi
13590
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013591# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013592# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013593# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013594# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013595# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013596# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013597
13598# This inline assembler syntax may also work for suncc and icc,
13599# so we try it on all platforms.
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13602$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013604/* end confdefs.h. */
13605
13606int
13607main ()
13608{
13609
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013610 unsigned short cw;
13611 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13612 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613
13614 ;
13615 return 0;
13616}
13617_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013618if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013619 have_gcc_asm_for_x87=yes
13620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013622fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013623rm -f core conftest.err conftest.$ac_objext \
13624 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13626$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013627if test "$have_gcc_asm_for_x87" = yes
13628then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013631
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13635$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13637/* end confdefs.h. */
13638
13639int
13640main ()
13641{
13642
13643 unsigned int fpcr;
13644 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13645 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13646
13647 ;
13648 return 0;
13649}
13650_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013651if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013652 have_gcc_asm_for_mc68881=yes
13653else
13654 have_gcc_asm_for_mc68881=no
13655fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013656rm -f core conftest.err conftest.$ac_objext \
13657 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13659$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13660if test "$have_gcc_asm_for_mc68881" = yes
13661then
13662
13663$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13664
13665fi
13666
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013667# Detect whether system arithmetic is subject to x87-style double
13668# rounding issues. The result of this test has little meaning on non
13669# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13670# mode is round-to-nearest and double rounding issues are present, and
13671# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13673$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674# $BASECFLAGS may affect the result
13675ac_save_cc="$CC"
13676CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013677if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013678 ac_cv_x87_double_rounding=no
13679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013681/* end confdefs.h. */
13682
13683#include <stdlib.h>
13684#include <math.h>
13685int main() {
13686 volatile double x, y, z;
13687 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13688 x = 0.99999999999999989; /* 1-2**-53 */
13689 y = 1./x;
13690 if (y != 1.)
13691 exit(0);
13692 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13693 x = 1e16;
13694 y = 2.99999;
13695 z = x + y;
13696 if (z != 1e16+4.)
13697 exit(0);
13698 /* both tests show evidence of double rounding */
13699 exit(1);
13700}
13701
13702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013703if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013704 ac_cv_x87_double_rounding=no
13705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013710fi
13711
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013712CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13714$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013715if test "$ac_cv_x87_double_rounding" = yes
13716then
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013719
13720fi
13721
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722# ************************************
13723# * Check for mathematical functions *
13724# ************************************
13725
13726LIBS_SAVE=$LIBS
13727LIBS="$LIBS $LIBM"
13728
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013729for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13730do :
13731 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13732ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013733if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013734 cat >>confdefs.h <<_ACEOF
13735#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13736_ACEOF
13737
13738fi
13739done
13740
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013741for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013742do :
13743 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13744ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013745if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013746 cat >>confdefs.h <<_ACEOF
13747#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13748_ACEOF
13749
13750fi
13751done
13752
13753ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13754"
Victor Stinnere0be4232011-10-25 13:06:09 +020013755if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013756 ac_have_decl=1
13757else
13758 ac_have_decl=0
13759fi
13760
13761cat >>confdefs.h <<_ACEOF
13762#define HAVE_DECL_ISINF $ac_have_decl
13763_ACEOF
13764ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13765"
Victor Stinnere0be4232011-10-25 13:06:09 +020013766if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013767 ac_have_decl=1
13768else
13769 ac_have_decl=0
13770fi
13771
13772cat >>confdefs.h <<_ACEOF
13773#define HAVE_DECL_ISNAN $ac_have_decl
13774_ACEOF
13775ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13776"
Victor Stinnere0be4232011-10-25 13:06:09 +020013777if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013778 ac_have_decl=1
13779else
13780 ac_have_decl=0
13781fi
13782
13783cat >>confdefs.h <<_ACEOF
13784#define HAVE_DECL_ISFINITE $ac_have_decl
13785_ACEOF
13786
13787
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013788# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13789# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13791$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013794else
13795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013797 ac_cv_tanh_preserves_zero_sign=no
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013800/* end confdefs.h. */
13801
13802#include <math.h>
13803#include <stdlib.h>
13804int main() {
13805 /* return 0 if either negative zeros don't exist
13806 on this platform or if negative zeros exist
13807 and tanh(-0.) == -0. */
13808 if (atan2(0., -1.) == atan2(-0., -1.) ||
13809 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13810 else exit(1);
13811}
13812
13813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013814if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013815 ac_cv_tanh_preserves_zero_sign=yes
13816else
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013821fi
13822
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013823fi
13824
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13826$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013827if test "$ac_cv_tanh_preserves_zero_sign" = yes
13828then
13829
Matthias Kloseb9621712010-04-24 17:59:49 +000013830$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013831
13832fi
13833
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013834if test "$ac_cv_func_log1p" = yes
13835then
13836 # On some versions of AIX, log1p(-0.) returns 0. instead of
13837 # -0. See issue #9920.
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13839$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013840 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013841 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013842else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013843
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013844 if test "$cross_compiling" = yes; then :
13845 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013846else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13848/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013849
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013850 #include <math.h>
13851 #include <stdlib.h>
13852 int main() {
13853 /* Fail if the signs of log1p(-0.) and -0. can be
13854 distinguished. */
13855 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13856 return 0;
13857 else
13858 return 1;
13859 }
13860
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013861_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013862if ac_fn_c_try_run "$LINENO"; then :
13863 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013864else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013865 ac_cv_log1p_drops_zero_sign=yes
13866fi
13867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013869fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013870
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013871fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013872
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13874$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13875fi
13876if test "$ac_cv_log1p_drops_zero_sign" = yes
13877then
13878
13879$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13880
13881fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013882
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013883LIBS=$LIBS_SAVE
13884
Mark Dickinsona614f042009-11-28 12:48:43 +000013885# For multiprocessing module, check that sem_open
13886# actually works. For FreeBSD versions <= 7.2,
13887# the kernel module that provides POSIX semaphores
13888# isn't loaded by default, so an attempt to call
13889# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13891$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013892if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013894else
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013896 ac_cv_posix_semaphores_enabled=yes
13897else
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013899/* end confdefs.h. */
13900
13901#include <unistd.h>
13902#include <fcntl.h>
13903#include <stdio.h>
13904#include <semaphore.h>
13905#include <sys/stat.h>
13906
13907int main(void) {
13908 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13909 if (a == SEM_FAILED) {
13910 perror("sem_open");
13911 return 1;
13912 }
13913 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013914 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013915 return 0;
13916}
13917
13918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013919if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013920 ac_cv_posix_semaphores_enabled=yes
13921else
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013926fi
13927
13928
Mark Dickinsona614f042009-11-28 12:48:43 +000013929fi
13930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13932$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013933if test $ac_cv_posix_semaphores_enabled = no
13934then
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013937
13938fi
13939
Mark Dickinson10683072009-04-18 21:18:19 +000013940# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13942$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013943if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013945else
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013947 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013948else
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013950/* end confdefs.h. */
13951
13952#include <unistd.h>
13953#include <fcntl.h>
13954#include <stdio.h>
13955#include <semaphore.h>
13956#include <sys/stat.h>
13957
13958int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013959 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013960 int count;
13961 int res;
13962 if(a==SEM_FAILED){
13963 perror("sem_open");
13964 return 1;
13965
13966 }
13967 res = sem_getvalue(a, &count);
13968 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013969 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013970 return res==-1 ? 1 : 0;
13971}
13972
Mark Dickinson10683072009-04-18 21:18:19 +000013973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013975 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013976else
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013981fi
13982
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013984fi
13985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13987$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013988if test $ac_cv_broken_sem_getvalue = yes
13989then
13990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013992
13993fi
13994
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030013995ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
13996"
13997if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
13998 ac_have_decl=1
13999else
14000 ac_have_decl=0
14001fi
14002
14003cat >>confdefs.h <<_ACEOF
14004#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14005_ACEOF
14006ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14007"
14008if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14009 ac_have_decl=1
14010else
14011 ac_have_decl=0
14012fi
14013
14014cat >>confdefs.h <<_ACEOF
14015#define HAVE_DECL_RTLD_NOW $ac_have_decl
14016_ACEOF
14017ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14018"
14019if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14020 ac_have_decl=1
14021else
14022 ac_have_decl=0
14023fi
14024
14025cat >>confdefs.h <<_ACEOF
14026#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14027_ACEOF
14028ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14029"
14030if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14031 ac_have_decl=1
14032else
14033 ac_have_decl=0
14034fi
14035
14036cat >>confdefs.h <<_ACEOF
14037#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14038_ACEOF
14039ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14040"
14041if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14042 ac_have_decl=1
14043else
14044 ac_have_decl=0
14045fi
14046
14047cat >>confdefs.h <<_ACEOF
14048#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14049_ACEOF
14050ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14051"
14052if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14053 ac_have_decl=1
14054else
14055 ac_have_decl=0
14056fi
14057
14058cat >>confdefs.h <<_ACEOF
14059#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14060_ACEOF
14061ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14062"
14063if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14064 ac_have_decl=1
14065else
14066 ac_have_decl=0
14067fi
14068
14069cat >>confdefs.h <<_ACEOF
14070#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14071_ACEOF
14072
14073
Mark Dickinsonbd792642009-03-18 20:06:12 +000014074# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14076$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014077# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014078if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014079 enableval=$enable_big_digits; case $enable_big_digits in
14080yes)
14081 enable_big_digits=30 ;;
14082no)
14083 enable_big_digits=15 ;;
1408415|30)
14085 ;;
14086*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014087 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 +000014088esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14090$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014091
14092cat >>confdefs.h <<_ACEOF
14093#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14094_ACEOF
14095
14096
14097else
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14099$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014100fi
14101
14102
Guido van Rossumef2255b2000-03-10 22:30:29 +000014103# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014104ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014105if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
14107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014110 wchar_h="yes"
14111
Guido van Rossumef2255b2000-03-10 22:30:29 +000014112else
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014114
14115fi
14116
Michael W. Hudson54241132001-12-07 15:38:26 +000014117
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014119# determine wchar_t size
14120if test "$wchar_h" = yes
14121then
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14125# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14127$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014128if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014130else
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14132"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Martin v. Löwis11437992002-04-12 09:54:03 +000014134else
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 if test "$ac_cv_type_wchar_t" = yes; then
14136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014138as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014139See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140 else
14141 ac_cv_sizeof_wchar_t=0
14142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014144
Martin v. Löwis11437992002-04-12 09:54:03 +000014145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14147$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148
14149
14150
Martin v. Löwis11437992002-04-12 09:54:03 +000014151cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014152#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014153_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014154
Michael W. Hudson54241132001-12-07 15:38:26 +000014155
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014156fi
14157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14159$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014160have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014163
14164#include <tcl.h>
14165#if TCL_UTF_MAX != 6
14166# error "NOT UCS4_TCL"
14167#endif
14168int
14169main ()
14170{
14171
14172 ;
14173 return 0;
14174}
14175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014177
14178
Matthias Kloseb9621712010-04-24 17:59:49 +000014179$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014180
14181 have_ucs4_tcl=yes
14182
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14186$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014187
Skip Montanaro6dead952003-09-25 14:50:04 +000014188# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014189if test "$wchar_h" = yes
14190then
14191 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14193$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014194 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014196else
14197
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014199 ac_cv_wchar_t_signed=yes
14200else
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014202/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014203
14204 #include <wchar.h>
14205 int main()
14206 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014207 /* Success: exit code 0 */
14208 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014209 }
14210
14211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014212if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014213 ac_cv_wchar_t_signed=yes
14214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014219fi
14220
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014221fi
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14224$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014225fi
14226
Georg Brandl52d168a2008-01-07 18:10:24 +000014227# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014228if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014229 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014230then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014231 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
Georg Brandl52d168a2008-01-07 18:10:24 +000014235else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014236 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014237fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14239$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014240
14241# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14243$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014244if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014246else
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 ac_cv_c_bigendian=unknown
14248 # See if we're dealing with a universal compiler.
14249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14250/* end confdefs.h. */
14251#ifndef __APPLE_CC__
14252 not a universal capable compiler
14253 #endif
14254 typedef int dummy;
14255
Skip Montanaro6dead952003-09-25 14:50:04 +000014256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014257if ac_fn_c_try_compile "$LINENO"; then :
14258
14259 # Check for potential -arch flags. It is not universal unless
14260 # there are at least two -arch flags with different values.
14261 ac_arch=
14262 ac_prev=
14263 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14264 if test -n "$ac_prev"; then
14265 case $ac_word in
14266 i?86 | x86_64 | ppc | ppc64)
14267 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14268 ac_arch=$ac_word
14269 else
14270 ac_cv_c_bigendian=universal
14271 break
14272 fi
14273 ;;
14274 esac
14275 ac_prev=
14276 elif test "x$ac_word" = "x-arch"; then
14277 ac_prev=arch
14278 fi
14279 done
14280fi
14281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14282 if test $ac_cv_c_bigendian = unknown; then
14283 # See if sys/param.h defines the BYTE_ORDER macro.
14284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014285/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014286#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014288
Martin v. Löwis11437992002-04-12 09:54:03 +000014289int
14290main ()
14291{
Matthias Kloseb9621712010-04-24 17:59:49 +000014292#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14293 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14294 && LITTLE_ENDIAN)
14295 bogus endian macros
14296 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
14298 ;
14299 return 0;
14300}
14301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014302if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014303 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014305/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014306#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014308
Martin v. Löwis11437992002-04-12 09:54:03 +000014309int
14310main ()
14311{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014312#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 not big endian
14314 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
14316 ;
14317 return 0;
14318}
14319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014320if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014321 ac_cv_c_bigendian=yes
14322else
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014326fi
14327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14328 fi
14329 if test $ac_cv_c_bigendian = unknown; then
14330 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014332/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014333#include <limits.h>
14334
Martin v. Löwis11437992002-04-12 09:54:03 +000014335int
14336main ()
14337{
Matthias Kloseb9621712010-04-24 17:59:49 +000014338#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14339 bogus endian macros
14340 #endif
14341
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 ;
14343 return 0;
14344}
14345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014346if ac_fn_c_try_compile "$LINENO"; then :
14347 # It does; now see whether it defined to _BIG_ENDIAN or not.
14348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14349/* end confdefs.h. */
14350#include <limits.h>
14351
14352int
14353main ()
14354{
14355#ifndef _BIG_ENDIAN
14356 not big endian
14357 #endif
14358
14359 ;
14360 return 0;
14361}
14362_ACEOF
14363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014365else
Matthias Kloseb9621712010-04-24 17:59:49 +000014366 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14369fi
14370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14371 fi
14372 if test $ac_cv_c_bigendian = unknown; then
14373 # Compile a test program.
14374 if test "$cross_compiling" = yes; then :
14375 # Try to guess by grepping values from an object file.
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377/* end confdefs.h. */
14378short int ascii_mm[] =
14379 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14380 short int ascii_ii[] =
14381 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14382 int use_ascii (int i) {
14383 return ascii_mm[i] + ascii_ii[i];
14384 }
14385 short int ebcdic_ii[] =
14386 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14387 short int ebcdic_mm[] =
14388 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14389 int use_ebcdic (int i) {
14390 return ebcdic_mm[i] + ebcdic_ii[i];
14391 }
14392 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394int
14395main ()
14396{
14397return use_ascii (foo) == use_ebcdic (foo);
14398 ;
14399 return 0;
14400}
14401_ACEOF
14402if ac_fn_c_try_compile "$LINENO"; then :
14403 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14404 ac_cv_c_bigendian=yes
14405 fi
14406 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14407 if test "$ac_cv_c_bigendian" = unknown; then
14408 ac_cv_c_bigendian=no
14409 else
14410 # finding both strings is unlikely to happen, but who knows?
14411 ac_cv_c_bigendian=unknown
14412 fi
14413 fi
14414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014416else
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014418/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014420int
14421main ()
14422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 /* Are we little or big endian? From Harbison&Steele. */
14425 union
14426 {
14427 long int l;
14428 char c[sizeof (long int)];
14429 } u;
14430 u.l = 1;
14431 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432
14433 ;
14434 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014435}
Martin v. Löwis11437992002-04-12 09:54:03 +000014436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014438 ac_cv_c_bigendian=no
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14449$as_echo "$ac_cv_c_bigendian" >&6; }
14450 case $ac_cv_c_bigendian in #(
14451 yes)
14452 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14453;; #(
14454 no)
14455 ;; #(
14456 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 ;; #(
14461 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014462 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014463 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014465
Michael W. Hudson54241132001-12-07 15:38:26 +000014466
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014467# ABI version string for Python extension modules. This appears between the
14468# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14469# from the following attributes which affect the ABI of this Python build (in
14470# this order):
14471#
14472# * The Python implementation (always 'cpython-' for us)
14473# * The major and minor version numbers
14474# * --with-pydebug (adds a 'd')
14475# * --with-pymalloc (adds a 'm')
14476# * --with-wide-unicode (adds a 'u')
14477#
14478# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014479# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14480# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014481
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14483$as_echo_n "checking ABIFLAGS... " >&6; }
14484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14485$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14487$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014488SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14490$as_echo "$SOABI" >&6; }
14491
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014492
14493case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014494 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014495 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14496 *)
14497 EXT_SUFFIX=${SHLIB_SUFFIX};;
14498esac
14499
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14501$as_echo_n "checking LDVERSION... " >&6; }
14502LDVERSION='$(VERSION)$(ABIFLAGS)'
14503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14504$as_echo "$LDVERSION" >&6; }
14505
doko@python.org87421192013-01-26 11:39:31 +010014506
doko@ubuntu.com55532312016-06-14 08:55:19 +020014507if test x$PLATFORM_TRIPLET = x; then
14508 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14509else
14510 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14511fi
doko@python.org87421192013-01-26 11:39:31 +010014512
14513
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014514# Check whether right shifting a negative integer extends the sign bit
14515# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14517$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014520else
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
Matthias Kloseb9621712010-04-24 17:59:49 +000014522if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014523 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014524else
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014526/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014527
14528int main()
14529{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014530 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014531}
14532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014534if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014535 ac_cv_rshift_extends_sign=yes
14536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014541fi
14542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543fi
14544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14546$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014547if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014548then
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014551
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014552fi
14553
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014554# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14556$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014557if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014562/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014563#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014564int
14565main ()
14566{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014567
14568 FILE *f = fopen("/dev/null", "r");
14569 flockfile(f);
14570 getc_unlocked(f);
14571 funlockfile(f);
14572
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 ;
14574 return 0;
14575}
14576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014577if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014578 ac_cv_have_getc_unlocked=yes
14579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 ac_cv_have_getc_unlocked=no
14581fi
14582rm -f core conftest.err conftest.$ac_objext \
14583 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14587$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014588if test "$ac_cv_have_getc_unlocked" = yes
14589then
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014592
14593fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014594
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014595# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014596# save the value of LIBS so we don't actually link Python with readline
14597LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014598
Gregory P. Smith18820942008-09-07 06:24:49 +000014599# On some systems we need to link readline to a termcap compatible
14600# library. NOTE: Keep the precedence of listed libraries synchronised
14601# with setup.py.
14602py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14604$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014605for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014606 if test -z "$py_libtermcap"; then
14607 READLINE_LIBS="-lreadline"
14608 else
14609 READLINE_LIBS="-lreadline -l$py_libtermcap"
14610 fi
14611 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014613/* end confdefs.h. */
14614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615/* Override any GCC internal prototype to avoid an error.
14616 Use char because int might match the return type of a GCC
14617 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014618#ifdef __cplusplus
14619extern "C"
14620#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014621char readline ();
14622int
14623main ()
14624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014626 ;
14627 return 0;
14628}
14629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014630if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014631 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014633rm -f core conftest.err conftest.$ac_objext \
14634 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014635 if test $py_cv_lib_readline = yes; then
14636 break
14637 fi
14638done
14639# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14640#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014641if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14643$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014644else
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14646$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014649
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014650fi
14651
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014652# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14654$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014655if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014657else
14658 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014659LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014661/* end confdefs.h. */
14662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663/* Override any GCC internal prototype to avoid an error.
14664 Use char because int might match the return type of a GCC
14665 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014666#ifdef __cplusplus
14667extern "C"
14668#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014669char rl_callback_handler_install ();
14670int
14671main ()
14672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014679 ac_cv_lib_readline_rl_callback_handler_install=yes
14680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014683rm -f core conftest.err conftest.$ac_objext \
14684 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014685LIBS=$ac_check_lib_save_LIBS
14686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14688$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014689if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014692
14693fi
14694
14695
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014696# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014698/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014699#include <readline/readline.h>
14700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014701if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014702 have_readline=yes
14703else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014704 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014705
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014706fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014707rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014708if test $have_readline = yes
14709then
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014711/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014712#include <readline/readline.h>
14713
14714_ACEOF
14715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014717
Matthias Kloseb9621712010-04-24 17:59:49 +000014718$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014719
14720fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014721rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014724/* end confdefs.h. */
14725#include <readline/readline.h>
14726
14727_ACEOF
14728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014732
14733fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014734rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014735
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014736fi
14737
Martin v. Löwis0daad592001-09-30 21:09:59 +000014738# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14740$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014743else
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014745LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749/* Override any GCC internal prototype to avoid an error.
14750 Use char because int might match the return type of a GCC
14751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014752#ifdef __cplusplus
14753extern "C"
14754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014755char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014756int
14757main ()
14758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 ;
14761 return 0;
14762}
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014769rm -f core conftest.err conftest.$ac_objext \
14770 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014771LIBS=$ac_check_lib_save_LIBS
14772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14774$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014775if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014778
Martin v. Löwis0daad592001-09-30 21:09:59 +000014779fi
14780
Michael W. Hudson54241132001-12-07 15:38:26 +000014781
Thomas Wouters89d996e2007-09-08 17:39:28 +000014782# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14784$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014785if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014787else
14788 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014789LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014791/* end confdefs.h. */
14792
14793/* Override any GCC internal prototype to avoid an error.
14794 Use char because int might match the return type of a GCC
14795 builtin and then its argument prototype would still apply. */
14796#ifdef __cplusplus
14797extern "C"
14798#endif
14799char rl_completion_display_matches_hook ();
14800int
14801main ()
14802{
14803return rl_completion_display_matches_hook ();
14804 ;
14805 return 0;
14806}
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014809 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813rm -f core conftest.err conftest.$ac_objext \
14814 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014815LIBS=$ac_check_lib_save_LIBS
14816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14818$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014819if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014822
14823fi
14824
14825
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014826# also in 4.0, but not in editline
14827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14828$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14829if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14830 $as_echo_n "(cached) " >&6
14831else
14832 ac_check_lib_save_LIBS=$LIBS
14833LIBS="-lreadline $READLINE_LIBS $LIBS"
14834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835/* end confdefs.h. */
14836
14837/* Override any GCC internal prototype to avoid an error.
14838 Use char because int might match the return type of a GCC
14839 builtin and then its argument prototype would still apply. */
14840#ifdef __cplusplus
14841extern "C"
14842#endif
14843char rl_resize_terminal ();
14844int
14845main ()
14846{
14847return rl_resize_terminal ();
14848 ;
14849 return 0;
14850}
14851_ACEOF
14852if ac_fn_c_try_link "$LINENO"; then :
14853 ac_cv_lib_readline_rl_resize_terminal=yes
14854else
14855 ac_cv_lib_readline_rl_resize_terminal=no
14856fi
14857rm -f core conftest.err conftest.$ac_objext \
14858 conftest$ac_exeext conftest.$ac_ext
14859LIBS=$ac_check_lib_save_LIBS
14860fi
14861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14862$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14863if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14864
14865$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14866
14867fi
14868
14869
Martin v. Löwis0daad592001-09-30 21:09:59 +000014870# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14872$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014873if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014877LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881/* Override any GCC internal prototype to avoid an error.
14882 Use char because int might match the return type of a GCC
14883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014884#ifdef __cplusplus
14885extern "C"
14886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014887char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014888int
14889main ()
14890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ;
14893 return 0;
14894}
14895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014898else
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014901rm -f core conftest.err conftest.$ac_objext \
14902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014903LIBS=$ac_check_lib_save_LIBS
14904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14906$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014907if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014910
Guido van Rossum353ae582001-07-10 16:45:32 +000014911fi
14912
Jack Jansendd19cf82001-12-06 22:36:17 +000014913
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014914# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014916/* end confdefs.h. */
14917#include <readline/readline.h>
14918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014919if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014920 have_readline=yes
14921else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014922 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014923
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014925rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014926if test $have_readline = yes
14927then
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014929/* end confdefs.h. */
14930#include <readline/readline.h>
14931
14932_ACEOF
14933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014935
Matthias Kloseb9621712010-04-24 17:59:49 +000014936$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014937
14938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014939rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014940
14941fi
14942
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14944$as_echo_n "checking for append_history in -lreadline... " >&6; }
14945if ${ac_cv_lib_readline_append_history+:} false; then :
14946 $as_echo_n "(cached) " >&6
14947else
14948 ac_check_lib_save_LIBS=$LIBS
14949LIBS="-lreadline $READLINE_LIBS $LIBS"
14950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14951/* end confdefs.h. */
14952
14953/* Override any GCC internal prototype to avoid an error.
14954 Use char because int might match the return type of a GCC
14955 builtin and then its argument prototype would still apply. */
14956#ifdef __cplusplus
14957extern "C"
14958#endif
14959char append_history ();
14960int
14961main ()
14962{
14963return append_history ();
14964 ;
14965 return 0;
14966}
14967_ACEOF
14968if ac_fn_c_try_link "$LINENO"; then :
14969 ac_cv_lib_readline_append_history=yes
14970else
14971 ac_cv_lib_readline_append_history=no
14972fi
14973rm -f core conftest.err conftest.$ac_objext \
14974 conftest$ac_exeext conftest.$ac_ext
14975LIBS=$ac_check_lib_save_LIBS
14976fi
14977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14978$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14979if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14980
14981$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14982
14983fi
14984
14985
Martin v. Löwis82bca632006-02-10 20:49:30 +000014986# End of readline checks: restore LIBS
14987LIBS=$LIBS_no_readline
14988
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14990$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014991if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014993else
Martin v. Löwis11437992002-04-12 09:54:03 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014996 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014997else
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014999/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015000
15001int main()
15002{
15003 int val1 = nice(1);
15004 if (val1 != -1 && val1 == nice(2))
15005 exit(0);
15006 exit(1);
15007}
15008
Martin v. Löwis11437992002-04-12 09:54:03 +000015009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015011 ac_cv_broken_nice=yes
15012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015017fi
15018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019fi
15020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15022$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015023if test "$ac_cv_broken_nice" = yes
15024then
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
Matthias Kloseb9621712010-04-24 17:59:49 +000015026$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015027
15028fi
15029
Matthias Kloseb9621712010-04-24 17:59:49 +000015030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15031$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015032if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015034else
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015036 ac_cv_broken_poll=no
15037else
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015039/* end confdefs.h. */
15040
15041#include <poll.h>
15042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015043int main()
15044{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015045 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015046 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015047
15048 close (42);
15049
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015050 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015051 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015052 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015053 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015054 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015055 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015056 return 1;
15057}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015058
15059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015060if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015061 ac_cv_broken_poll=yes
15062else
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015069fi
15070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15072$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015073if test "$ac_cv_broken_poll" = yes
15074then
15075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015077
15078fi
15079
Brett Cannon43802422005-02-10 20:48:03 +000015080# 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 +000015081# (which is not required by ISO C or UNIX spec) and/or if we support
15082# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015083ac_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 +000015084#include <$ac_cv_struct_tm>
15085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086"
Victor Stinnere0be4232011-10-25 13:06:09 +020015087if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015088
15089cat >>confdefs.h <<_ACEOF
15090#define HAVE_STRUCT_TM_TM_ZONE 1
15091_ACEOF
15092
15093
15094fi
15095
15096if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015099
15100else
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15102"
Victor Stinnere0be4232011-10-25 13:06:09 +020015103if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105else
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107fi
15108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015110#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111_ACEOF
15112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15114$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015115if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015119/* end confdefs.h. */
15120#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121#if !HAVE_DECL_TZNAME
15122extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015123#endif
15124
15125int
15126main ()
15127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015129 ;
15130 return 0;
15131}
15132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015133if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015134 ac_cv_var_tzname=yes
15135else
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015138rm -f core conftest.err conftest.$ac_objext \
15139 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15142$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015143 if test $ac_cv_var_tzname = yes; then
15144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015146
15147 fi
15148fi
15149
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015150
Martin v. Löwis1d459062005-03-14 21:23:33 +000015151# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15153$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015154if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015156else
15157
Matthias Kloseb9621712010-04-24 17:59:49 +000015158if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015159 ac_cv_working_tzset=no
15160else
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015162/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015163
15164#include <stdlib.h>
15165#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015166#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015167
15168#if HAVE_TZNAME
15169extern char *tzname[];
15170#endif
15171
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015172int main()
15173{
Brett Cannon18367812003-09-19 00:59:16 +000015174 /* Note that we need to ensure that not only does tzset(3)
15175 do 'something' with localtime, but it works as documented
15176 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015177 This includes making sure that tzname is set properly if
15178 tm->tm_zone does not exist since it is the alternative way
15179 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015180
15181 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015182 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015183 */
15184
Martin v. Löwis1d459062005-03-14 21:23:33 +000015185 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015186 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15187
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015188 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015189 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015190 if (localtime(&groundhogday)->tm_hour != 0)
15191 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015192#if HAVE_TZNAME
15193 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15194 if (strcmp(tzname[0], "UTC") ||
15195 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15196 exit(1);
15197#endif
Brett Cannon18367812003-09-19 00:59:16 +000015198
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015199 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015200 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015201 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015202 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015203#if HAVE_TZNAME
15204 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15205 exit(1);
15206#endif
Brett Cannon18367812003-09-19 00:59:16 +000015207
15208 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15209 tzset();
15210 if (localtime(&groundhogday)->tm_hour != 11)
15211 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015212#if HAVE_TZNAME
15213 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15214 exit(1);
15215#endif
15216
15217#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015218 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15219 exit(1);
15220 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15221 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015222#endif
Brett Cannon18367812003-09-19 00:59:16 +000015223
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015224 exit(0);
15225}
15226
15227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015228if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015229 ac_cv_working_tzset=yes
15230else
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015235fi
15236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237fi
15238
Matthias Kloseb9621712010-04-24 17:59:49 +000015239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15240$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015241if test "$ac_cv_working_tzset" = yes
15242then
15243
Matthias Kloseb9621712010-04-24 17:59:49 +000015244$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015245
15246fi
15247
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015248# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15250$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015251if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015253else
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015255/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015256#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015257int
15258main ()
15259{
15260
15261struct stat st;
15262st.st_mtim.tv_nsec = 1;
15263
15264 ;
15265 return 0;
15266}
15267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015269 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015270else
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15274fi
15275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15277$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015278if test "$ac_cv_stat_tv_nsec" = yes
15279then
15280
Matthias Kloseb9621712010-04-24 17:59:49 +000015281$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015282
15283fi
15284
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015285# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15287$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015288if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015290else
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015292/* end confdefs.h. */
15293#include <sys/stat.h>
15294int
15295main ()
15296{
15297
15298struct stat st;
15299st.st_mtimespec.tv_nsec = 1;
15300
15301 ;
15302 return 0;
15303}
15304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015306 ac_cv_stat_tv_nsec2=yes
15307else
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15311fi
15312
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15314$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015315if test "$ac_cv_stat_tv_nsec2" = yes
15316then
15317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015319
15320fi
15321
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015322# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015323ac_save_cppflags="$CPPFLAGS"
15324CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015325
15326for ac_header in curses.h ncurses.h
15327do :
15328 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15329ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15330if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15331 cat >>confdefs.h <<_ACEOF
15332#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15333_ACEOF
15334
15335fi
15336
15337done
15338
15339
15340# On Solaris, term.h requires curses.h
15341for ac_header in term.h
15342do :
15343 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15344#ifdef HAVE_CURSES_H
15345#include <curses.h>
15346#endif
15347
15348"
15349if test "x$ac_cv_header_term_h" = xyes; then :
15350 cat >>confdefs.h <<_ACEOF
15351#define HAVE_TERM_H 1
15352_ACEOF
15353
15354fi
15355
15356done
15357
15358
Jack Jansen666b1e72001-10-31 12:11:48 +000015359# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15361$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015366/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015367#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015368int
15369main ()
15370{
Jack Jansen666b1e72001-10-31 12:11:48 +000015371
15372 int rtn;
15373 rtn = mvwdelch(0,0,0);
15374
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ;
15376 return 0;
15377}
15378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015379if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015380 ac_cv_mvwdelch_is_expression=yes
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15385fi
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15388$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015389
15390if test "$ac_cv_mvwdelch_is_expression" = yes
15391then
Martin v. Löwis11437992002-04-12 09:54:03 +000015392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015394
15395fi
15396
Matthias Kloseb9621712010-04-24 17:59:49 +000015397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15398$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015399if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015401else
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015403/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015404#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015405int
15406main ()
15407{
Jack Jansen666b1e72001-10-31 12:11:48 +000015408
15409 WINDOW *w;
15410 w->_flags = 0;
15411
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 ;
15413 return 0;
15414}
15415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015416if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015417 ac_cv_window_has_flags=yes
15418else
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15422fi
15423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15425$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015426
Jack Jansen666b1e72001-10-31 12:11:48 +000015427
15428if test "$ac_cv_window_has_flags" = yes
15429then
Martin v. Löwis11437992002-04-12 09:54:03 +000015430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015432
15433fi
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15436$as_echo_n "checking for is_term_resized... " >&6; }
15437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015438/* end confdefs.h. */
15439#include <curses.h>
15440int
15441main ()
15442{
15443void *x=is_term_resized
15444 ;
15445 return 0;
15446}
15447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015451
Matthias Kloseb159a552010-04-25 21:00:44 +000015452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015453$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015454else
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15456$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015457
15458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15462$as_echo_n "checking for resize_term... " >&6; }
15463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015464/* end confdefs.h. */
15465#include <curses.h>
15466int
15467main ()
15468{
15469void *x=resize_term
15470 ;
15471 return 0;
15472}
15473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015474if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015475
Matthias Kloseb9621712010-04-24 17:59:49 +000015476$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015477
Matthias Kloseb159a552010-04-25 21:00:44 +000015478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015479$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015480else
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15482$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015483
15484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15488$as_echo_n "checking for resizeterm... " >&6; }
15489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015490/* end confdefs.h. */
15491#include <curses.h>
15492int
15493main ()
15494{
15495void *x=resizeterm
15496 ;
15497 return 0;
15498}
15499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015500if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015503
Matthias Kloseb159a552010-04-25 21:00:44 +000015504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015506else
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15508$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015509
15510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015512# last curses configure check
15513CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015514
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15516$as_echo "$as_me: checking for device files" >&6;}
15517
15518if test "x$cross_compiling" = xyes; then
15519 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15521$as_echo_n "checking for /dev/ptmx... " >&6; }
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15523$as_echo "not set" >&6; }
15524 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15525 fi
15526 if test "${ac_cv_file__dev_ptc+set}" != set; then
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15528$as_echo_n "checking for /dev/ptc... " >&6; }
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15530$as_echo "not set" >&6; }
15531 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15532 fi
15533fi
15534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15536$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015537if ${ac_cv_file__dev_ptmx+:} false; then :
15538 $as_echo_n "(cached) " >&6
15539else
15540 test "$cross_compiling" = yes &&
15541 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15542if test -r "/dev/ptmx"; then
15543 ac_cv_file__dev_ptmx=yes
15544else
15545 ac_cv_file__dev_ptmx=no
15546fi
15547fi
15548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15549$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15550if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015551
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015552fi
15553
15554if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015557
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15560$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015561if ${ac_cv_file__dev_ptc+:} false; then :
15562 $as_echo_n "(cached) " >&6
15563else
15564 test "$cross_compiling" = yes &&
15565 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15566if test -r "/dev/ptc"; then
15567 ac_cv_file__dev_ptc=yes
15568else
15569 ac_cv_file__dev_ptc=no
15570fi
15571fi
15572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15573$as_echo "$ac_cv_file__dev_ptc" >&6; }
15574if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015575
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015576fi
15577
15578if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015581
Neal Norwitz865400f2003-03-21 01:42:58 +000015582fi
15583
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015586if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015588else
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015590 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015591if test x$GCC = xyes; then
15592save_CFLAGS=$CFLAGS
15593CFLAGS="$CFLAGS -Werror -Wformat"
15594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015595/* end confdefs.h. */
15596
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015597#include <stdio.h>
15598#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015599
15600int
15601main ()
15602{
15603
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015604char *buffer;
15605sprintf(buffer, "%lld", (long long)123);
15606sprintf(buffer, "%lld", (long long)-123);
15607sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015608
15609 ;
15610 return 0;
15611}
15612_ACEOF
15613if ac_fn_c_try_compile "$LINENO"; then :
15614 ac_cv_have_long_long_format=yes
15615
15616fi
15617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015618CFLAGS=$save_CFLAGS
15619fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015620else
Matthias Kloseb9621712010-04-24 17:59:49 +000015621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015622/* end confdefs.h. */
15623
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015624#include <stdio.h>
15625#include <stddef.h>
15626#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015627
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015628#ifdef HAVE_SYS_TYPES_H
15629#include <sys/types.h>
15630#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015631
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015632int main()
15633{
15634char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015635
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015636if (sprintf(buffer, "%lld", (long long)123) < 0)
15637return 1;
15638if (strcmp(buffer, "123"))
15639return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015640
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015641if (sprintf(buffer, "%lld", (long long)-123) < 0)
15642return 1;
15643if (strcmp(buffer, "-123"))
15644return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015645
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015646if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15647return 1;
15648if (strcmp(buffer, "123"))
15649return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015650
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015651return 0;
15652}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015653
15654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015655if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015656 ac_cv_have_long_long_format=yes
15657else
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015662fi
15663
15664
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015665fi
15666
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015668$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015669
Mark Dickinson89d7d412009-12-31 20:50:59 +000015670if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015671then
15672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015674
15675fi
15676
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015677if test $ac_sys_system = Darwin
15678then
15679 LIBS="$LIBS -framework CoreFoundation"
15680fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15683$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015684if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015686else
Matthias Kloseb9621712010-04-24 17:59:49 +000015687 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015688 ac_cv_have_size_t_format="cross -- assuming yes"
15689
Thomas Wouters477c8d52006-05-27 19:21:47 +000015690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015692/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015693
Thomas Wouters477c8d52006-05-27 19:21:47 +000015694#include <stdio.h>
15695#include <stddef.h>
15696#include <string.h>
15697
Christian Heimes2c181612007-12-17 20:04:13 +000015698#ifdef HAVE_SYS_TYPES_H
15699#include <sys/types.h>
15700#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015701
15702#ifdef HAVE_SSIZE_T
15703typedef ssize_t Py_ssize_t;
15704#elif SIZEOF_VOID_P == SIZEOF_LONG
15705typedef long Py_ssize_t;
15706#else
15707typedef int Py_ssize_t;
15708#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015709
Christian Heimes2c181612007-12-17 20:04:13 +000015710int main()
15711{
15712 char buffer[256];
15713
Thomas Wouters477c8d52006-05-27 19:21:47 +000015714 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15715 return 1;
15716
Thomas Wouters89f507f2006-12-13 04:49:30 +000015717 if (strcmp(buffer, "123"))
15718 return 1;
15719
15720 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15721 return 1;
15722
15723 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015724 return 1;
15725
15726 return 0;
15727}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015728
Thomas Wouters477c8d52006-05-27 19:21:47 +000015729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015731 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015732else
Matthias Kloseb9621712010-04-24 17:59:49 +000015733 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015737fi
15738
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15741$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015742if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015745
15746fi
15747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015749#ifdef HAVE_SYS_TYPES_H
15750#include <sys/types.h>
15751#endif
15752#ifdef HAVE_SYS_SOCKET_H
15753#include <sys/socket.h>
15754#endif
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756"
Victor Stinnere0be4232011-10-25 13:06:09 +020015757if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015758
Martin v. Löwis11437992002-04-12 09:54:03 +000015759else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015762
15763fi
15764
Michael W. Hudson54241132001-12-07 15:38:26 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15767$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015768if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015770else
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015772 ac_cv_broken_mbstowcs=no
15773else
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015775/* end confdefs.h. */
15776
Stefan Krah19c21392012-11-22 23:47:32 +010015777#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015778#include<stdlib.h>
15779int main() {
15780 size_t len = -1;
15781 const char *str = "text";
15782 len = mbstowcs(NULL, str, 0);
15783 return (len != 4);
15784}
15785
15786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015787if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015788 ac_cv_broken_mbstowcs=no
15789else
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015794fi
15795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015796fi
15797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15799$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015800if test "$ac_cv_broken_mbstowcs" = yes
15801then
15802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015804
15805fi
15806
Antoine Pitroub52ec782009-01-25 16:34:23 +000015807# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15809$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015810
15811# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015812if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015813 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015814if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015815then
15816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015818
Matthias Kloseb9621712010-04-24 17:59:49 +000015819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15820$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015821fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015822if test "$withval" = no
15823then
15824
15825$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15828$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015829fi
15830
Antoine Pitrou042b1282010-08-13 21:15:58 +000015831else
15832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15833$as_echo "no value specified" >&6; }
15834fi
15835
Antoine Pitroub52ec782009-01-25 16:34:23 +000015836
Matthias Kloseb17289e2012-03-15 19:51:34 +010015837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15838$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15839if ${ac_cv_computed_gotos+:} false; then :
15840 $as_echo_n "(cached) " >&6
15841else
15842 if test "$cross_compiling" = yes; then :
15843 if test "${with_computed_gotos+set}" = set; then
15844 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15845 else
15846 ac_cv_computed_gotos=no
15847 fi
15848else
15849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15850/* end confdefs.h. */
15851
15852int main(int argc, char **argv)
15853{
15854 static void *targets[1] = { &&LABEL1 };
15855 goto LABEL2;
15856LABEL1:
15857 return 0;
15858LABEL2:
15859 goto *targets[0];
15860 return 1;
15861}
15862
15863_ACEOF
15864if ac_fn_c_try_run "$LINENO"; then :
15865 ac_cv_computed_gotos=yes
15866else
15867 ac_cv_computed_gotos=no
15868fi
15869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15870 conftest.$ac_objext conftest.beam conftest.$ac_ext
15871fi
15872
15873fi
15874
15875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15876$as_echo "$ac_cv_computed_gotos" >&6; }
15877case "$ac_cv_computed_gotos" in yes*)
15878
15879$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15880
15881esac
15882
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015883case $ac_sys_system in
15884AIX*)
15885
15886$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15887 ;;
15888esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015889
Michael W. Hudson54241132001-12-07 15:38:26 +000015890
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015891
15892
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015893for h in `(cd $srcdir;echo Python/thread_*.h)`
15894do
15895 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15896done
15897
Michael W. Hudson54241132001-12-07 15:38:26 +000015898
Ned Deily0db50cf2014-07-25 12:41:31 -070015899SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15901$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015902for dir in $SRCDIRS; do
15903 if test ! -d $dir; then
15904 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015905 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015906done
Matthias Kloseb9621712010-04-24 17:59:49 +000015907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15908$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015909
Stefan Krah1919b7e2012-03-21 18:25:23 +010015910# Availability of -O2:
15911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15912$as_echo_n "checking for -O2... " >&6; }
15913saved_cflags="$CFLAGS"
15914CFLAGS="-O2"
15915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15916/* end confdefs.h. */
15917
15918int
15919main ()
15920{
15921
15922
15923 ;
15924 return 0;
15925}
15926_ACEOF
15927if ac_fn_c_try_compile "$LINENO"; then :
15928 have_O2=yes
15929else
15930 have_O2=no
15931fi
15932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15934$as_echo "$have_O2" >&6; }
15935CFLAGS="$saved_cflags"
15936
15937# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15938# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15940$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15941saved_cflags="$CFLAGS"
15942CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15943if test "$have_O2" = no; then
15944 CFLAGS=""
15945fi
15946if test "$cross_compiling" = yes; then :
15947 have_glibc_memmove_bug=undefined
15948else
15949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15950/* end confdefs.h. */
15951
15952#include <stdio.h>
15953#include <stdlib.h>
15954#include <string.h>
15955void foo(void *p, void *q) { memmove(p, q, 19); }
15956int main() {
15957 char a[32] = "123456789000000000";
15958 foo(&a[9], a);
15959 if (strcmp(a, "123456789123456789000000000") != 0)
15960 return 1;
15961 foo(a, &a[9]);
15962 if (strcmp(a, "123456789000000000") != 0)
15963 return 1;
15964 return 0;
15965}
15966
15967_ACEOF
15968if ac_fn_c_try_run "$LINENO"; then :
15969 have_glibc_memmove_bug=no
15970else
15971 have_glibc_memmove_bug=yes
15972fi
15973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15974 conftest.$ac_objext conftest.beam conftest.$ac_ext
15975fi
15976
15977CFLAGS="$saved_cflags"
15978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15979$as_echo "$have_glibc_memmove_bug" >&6; }
15980if test "$have_glibc_memmove_bug" = yes; then
15981
15982$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15983
15984fi
15985
15986if test "$have_gcc_asm_for_x87" = yes; then
15987 # Some versions of gcc miscompile inline asm:
15988 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15989 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15990 case $CC in
15991 *gcc*)
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15993$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15994 saved_cflags="$CFLAGS"
15995 CFLAGS="-O2"
15996 if test "$cross_compiling" = yes; then :
15997 have_ipa_pure_const_bug=undefined
15998else
15999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000/* end confdefs.h. */
16001
16002 __attribute__((noinline)) int
16003 foo(int *p) {
16004 int r;
16005 asm ( "movl \$6, (%1)\n\t"
16006 "xorl %0, %0\n\t"
16007 : "=r" (r) : "r" (p) : "memory"
16008 );
16009 return r;
16010 }
16011 int main() {
16012 int p = 8;
16013 if ((foo(&p) ? : p) != 6)
16014 return 1;
16015 return 0;
16016 }
16017
16018_ACEOF
16019if ac_fn_c_try_run "$LINENO"; then :
16020 have_ipa_pure_const_bug=no
16021else
16022 have_ipa_pure_const_bug=yes
16023fi
16024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16025 conftest.$ac_objext conftest.beam conftest.$ac_ext
16026fi
16027
16028 CFLAGS="$saved_cflags"
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16030$as_echo "$have_ipa_pure_const_bug" >&6; }
16031 if test "$have_ipa_pure_const_bug" = yes; then
16032
16033$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16034
16035 fi
16036 ;;
16037 esac
16038fi
16039
Victor Stinner4f5366e2015-01-09 02:13:19 +010016040# Check for stdatomic.h
16041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16042$as_echo_n "checking for stdatomic.h... " >&6; }
16043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16044/* end confdefs.h. */
16045
16046
16047 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016048 atomic_int value = ATOMIC_VAR_INIT(1);
16049 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016050 int main() {
16051 int loaded_value = atomic_load(&value);
16052 return 0;
16053 }
16054
16055
16056_ACEOF
16057if ac_fn_c_try_link "$LINENO"; then :
16058 have_stdatomic_h=yes
16059else
16060 have_stdatomic_h=no
16061fi
16062rm -f core conftest.err conftest.$ac_objext \
16063 conftest$ac_exeext conftest.$ac_ext
16064
16065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16066$as_echo "$have_stdatomic_h" >&6; }
16067
16068if test "$have_stdatomic_h" = yes; then
16069
16070$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16071
16072fi
16073
16074# Check for GCC >= 4.7 __atomic builtins
16075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16076$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16078/* end confdefs.h. */
16079
16080
16081 volatile int val = 1;
16082 int main() {
16083 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16084 return 0;
16085 }
16086
16087
16088_ACEOF
16089if ac_fn_c_try_link "$LINENO"; then :
16090 have_builtin_atomic=yes
16091else
16092 have_builtin_atomic=no
16093fi
16094rm -f core conftest.err conftest.$ac_objext \
16095 conftest$ac_exeext conftest.$ac_ext
16096
16097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16098$as_echo "$have_builtin_atomic" >&6; }
16099
16100if test "$have_builtin_atomic" = yes; then
16101
16102$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16103
16104fi
16105
Ned Deily322f5ba2013-11-21 23:01:59 -080016106# ensurepip option
16107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16108$as_echo_n "checking for ensurepip... " >&6; }
16109
16110# Check whether --with-ensurepip was given.
16111if test "${with_ensurepip+set}" = set; then :
16112 withval=$with_ensurepip;
16113else
16114 with_ensurepip=upgrade
16115fi
16116
16117case $with_ensurepip in #(
16118 yes|upgrade) :
16119 ENSUREPIP=upgrade ;; #(
16120 install) :
16121 ENSUREPIP=install ;; #(
16122 no) :
16123 ENSUREPIP=no ;; #(
16124 *) :
16125 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16126esac
16127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16128$as_echo "$ENSUREPIP" >&6; }
16129
16130
Victor Stinner35a97c02015-03-08 02:59:09 +010016131# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16133$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16135/* end confdefs.h. */
16136
16137
16138 #include <dirent.h>
16139
16140 int main() {
16141 struct dirent entry;
16142 return entry.d_type == DT_UNKNOWN;
16143 }
16144
16145
16146_ACEOF
16147if ac_fn_c_try_link "$LINENO"; then :
16148 have_dirent_d_type=yes
16149else
16150 have_dirent_d_type=no
16151fi
16152rm -f core conftest.err conftest.$ac_objext \
16153 conftest$ac_exeext conftest.$ac_ext
16154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16155$as_echo "$have_dirent_d_type" >&6; }
16156
16157if test "$have_dirent_d_type" = yes; then
16158
16159$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16160
16161fi
16162
Victor Stinner9eb57c52015-03-19 22:21:49 +010016163# check if the Linux getrandom() syscall is available
16164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16165$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16167/* end confdefs.h. */
16168
16169
Victor Stinner1b80b242016-04-12 22:34:58 +020016170 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016171 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016172 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016173
16174 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016175 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016176 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016177 const int flags = GRND_NONBLOCK;
16178 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016179 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016180 return 0;
16181 }
16182
16183
16184_ACEOF
16185if ac_fn_c_try_link "$LINENO"; then :
16186 have_getrandom_syscall=yes
16187else
16188 have_getrandom_syscall=no
16189fi
16190rm -f core conftest.err conftest.$ac_objext \
16191 conftest$ac_exeext conftest.$ac_ext
16192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16193$as_echo "$have_getrandom_syscall" >&6; }
16194
16195if test "$have_getrandom_syscall" = yes; then
16196
16197$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16198
16199fi
16200
Victor Stinner3abf44e2015-09-18 15:38:37 +020016201# check if the getrandom() function is available
16202# the test was written for the Solaris function of <sys/random.h>
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16204$as_echo_n "checking for the getrandom() function... " >&6; }
16205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16206/* end confdefs.h. */
16207
16208
16209 #include <sys/random.h>
16210
16211 int main() {
16212 char buffer[1];
16213 const size_t buflen = sizeof(buffer);
16214 const int flags = 0;
16215 /* ignore the result, Python checks for ENOSYS at runtime */
16216 (void)getrandom(buffer, buflen, flags);
16217 return 0;
16218 }
16219
16220
16221_ACEOF
16222if ac_fn_c_try_link "$LINENO"; then :
16223 have_getrandom=yes
16224else
16225 have_getrandom=no
16226fi
16227rm -f core conftest.err conftest.$ac_objext \
16228 conftest$ac_exeext conftest.$ac_ext
16229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16230$as_echo "$have_getrandom" >&6; }
16231
16232if test "$have_getrandom" = yes; then
16233
16234$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16235
16236fi
16237
Guido van Rossum627b2d71993-12-24 10:39:16 +000016238# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016239ac_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 +000016240
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016241ac_config_files="$ac_config_files Modules/ld_so_aix"
16242
Martin v. Löwis11437992002-04-12 09:54:03 +000016243cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016244# This file is a shell script that caches the results of configure
16245# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016246# scripts and configure runs, see configure's option --config-cache.
16247# It is not useful on other systems. If it contains results you don't
16248# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016249#
Martin v. Löwis11437992002-04-12 09:54:03 +000016250# config.status only pays attention to the cache file if you give it
16251# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016252#
Skip Montanaro6dead952003-09-25 14:50:04 +000016253# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016254# loading this file, other *unset* `ac_cv_foo' will be assigned the
16255# following values.
16256
16257_ACEOF
16258
Guido van Rossumf78abae1997-01-21 22:02:36 +000016259# The following way of writing the cache mishandles newlines in values,
16260# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016262# Ultrix sh set writes to stderr and can't be redirected directly,
16263# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264(
16265 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16266 eval ac_val=\$$ac_var
16267 case $ac_val in #(
16268 *${as_nl}*)
16269 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016270 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16271$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272 esac
16273 case $ac_var in #(
16274 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16276 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277 esac ;;
16278 esac
16279 done
16280
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16283 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016284 # `set' does not quote correctly, so add quotes: double-quote
16285 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016287 "s/'/'\\\\''/g;
16288 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 *)
16291 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294 esac |
16295 sort
16296) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16302 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16304 :end' >>confcache
16305if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16306 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016307 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16309$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016310 if test ! -f "$cache_file" || test -h "$cache_file"; then
16311 cat confcache >"$cache_file"
16312 else
16313 case $cache_file in #(
16314 */* | ?:*)
16315 mv -f confcache "$cache_file"$$ &&
16316 mv -f "$cache_file"$$ "$cache_file" ;; #(
16317 *)
16318 mv -f confcache "$cache_file" ;;
16319 esac
16320 fi
16321 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016322 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16324$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016325 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016326fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016327rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016329test "x$prefix" = xNONE && prefix=$ac_default_prefix
16330# Let make expand exec_prefix.
16331test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016333DEFS=-DHAVE_CONFIG_H
16334
Skip Montanaro6dead952003-09-25 14:50:04 +000016335ac_libobjs=
16336ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016337U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016338for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16339 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16343 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016344 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16345 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016346done
16347LIBOBJS=$ac_libobjs
16348
16349LTLIBOBJS=$ac_ltlibobjs
16350
16351
Martin v. Löwis11437992002-04-12 09:54:03 +000016352
Matthias Kloseb9621712010-04-24 17:59:49 +000016353
Victor Stinnere0be4232011-10-25 13:06:09 +020016354: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016355ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016356ac_clean_files_save=$ac_clean_files
16357ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016358{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16359$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16360as_write_fail=0
16361cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016362#! $SHELL
16363# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016364# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016365# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016366# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016367
Martin v. Löwis11437992002-04-12 09:54:03 +000016368debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016369ac_cs_recheck=false
16370ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016371
Matthias Kloseb9621712010-04-24 17:59:49 +000016372SHELL=\${CONFIG_SHELL-$SHELL}
16373export SHELL
16374_ASEOF
16375cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16376## -------------------- ##
16377## M4sh Initialization. ##
16378## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380# Be more Bourne compatible
16381DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016382if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 emulate sh
16384 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016386 # is contrary to our usage. Disable this feature.
16387 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016389else
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 case `(set -o) 2>/dev/null` in #(
16391 *posix*) :
16392 set -o posix ;; #(
16393 *) :
16394 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016396fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016397
16398
Matthias Kloseb9621712010-04-24 17:59:49 +000016399as_nl='
16400'
16401export as_nl
16402# Printing a long string crashes Solaris 7 /usr/bin/printf.
16403as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16404as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16405as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16406# Prefer a ksh shell builtin over an external printf program on Solaris,
16407# but without wasting forks for bash or zsh.
16408if test -z "$BASH_VERSION$ZSH_VERSION" \
16409 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16410 as_echo='print -r --'
16411 as_echo_n='print -rn --'
16412elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16413 as_echo='printf %s\n'
16414 as_echo_n='printf %s'
16415else
16416 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16417 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16418 as_echo_n='/usr/ucb/echo -n'
16419 else
16420 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16421 as_echo_n_body='eval
16422 arg=$1;
16423 case $arg in #(
16424 *"$as_nl"*)
16425 expr "X$arg" : "X\\(.*\\)$as_nl";
16426 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16427 esac;
16428 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16429 '
16430 export as_echo_n_body
16431 as_echo_n='sh -c $as_echo_n_body as_echo'
16432 fi
16433 export as_echo_body
16434 as_echo='sh -c $as_echo_body as_echo'
16435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016436
16437# The user is always right.
16438if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 PATH_SEPARATOR=:
16440 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16441 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16442 PATH_SEPARATOR=';'
16443 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446
16447# IFS
16448# We need space, tab and new line, in precisely that order. Quoting is
16449# there to prevent editors from complaining about space-tab.
16450# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16451# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452IFS=" "" $as_nl"
16453
16454# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016455as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016456case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457 *[\\/]* ) as_myself=$0 ;;
16458 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016459for as_dir in $PATH
16460do
16461 IFS=$as_save_IFS
16462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16464 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467 ;;
16468esac
16469# We did not find ourselves, most probably we were run as `sh COMMAND'
16470# in which case we are not to be found in the path.
16471if test "x$as_myself" = x; then
16472 as_myself=$0
16473fi
16474if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016475 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16476 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016477fi
16478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479# Unset variables that we do not need and which cause bugs (e.g. in
16480# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16481# suppresses any "Segmentation fault" message there. '((' could
16482# trigger a bug in pdksh 5.2.14.
16483for as_var in BASH_ENV ENV MAIL MAILPATH
16484do eval test x\${$as_var+set} = xset \
16485 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016486done
16487PS1='$ '
16488PS2='> '
16489PS4='+ '
16490
16491# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016492LC_ALL=C
16493export LC_ALL
16494LANGUAGE=C
16495export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496
Matthias Kloseb9621712010-04-24 17:59:49 +000016497# CDPATH.
16498(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16499
16500
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016501# as_fn_error STATUS ERROR [LINENO LOG_FD]
16502# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016503# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16504# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016505# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016506as_fn_error ()
16507{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016508 as_status=$1; test $as_status -eq 0 && as_status=1
16509 if test "$4"; then
16510 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16511 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016513 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016514 as_fn_exit $as_status
16515} # as_fn_error
16516
16517
16518# as_fn_set_status STATUS
16519# -----------------------
16520# Set $? to STATUS, without forking.
16521as_fn_set_status ()
16522{
16523 return $1
16524} # as_fn_set_status
16525
16526# as_fn_exit STATUS
16527# -----------------
16528# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16529as_fn_exit ()
16530{
16531 set +e
16532 as_fn_set_status $1
16533 exit $1
16534} # as_fn_exit
16535
16536# as_fn_unset VAR
16537# ---------------
16538# Portably unset VAR.
16539as_fn_unset ()
16540{
16541 { eval $1=; unset $1;}
16542}
16543as_unset=as_fn_unset
16544# as_fn_append VAR VALUE
16545# ----------------------
16546# Append the text in VALUE to the end of the definition contained in VAR. Take
16547# advantage of any shell optimizations that allow amortized linear growth over
16548# repeated appends, instead of the typical quadratic growth present in naive
16549# implementations.
16550if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16551 eval 'as_fn_append ()
16552 {
16553 eval $1+=\$2
16554 }'
16555else
16556 as_fn_append ()
16557 {
16558 eval $1=\$$1\$2
16559 }
16560fi # as_fn_append
16561
16562# as_fn_arith ARG...
16563# ------------------
16564# Perform arithmetic evaluation on the ARGs, and store the result in the
16565# global $as_val. Take advantage of shells that can avoid forks. The arguments
16566# must be portable across $(()) and expr.
16567if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16568 eval 'as_fn_arith ()
16569 {
16570 as_val=$(( $* ))
16571 }'
16572else
16573 as_fn_arith ()
16574 {
16575 as_val=`expr "$@" || test $? -eq 1`
16576 }
16577fi # as_fn_arith
16578
16579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580if expr a : '\(a\)' >/dev/null 2>&1 &&
16581 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16582 as_expr=expr
16583else
16584 as_expr=false
16585fi
16586
16587if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16588 as_basename=basename
16589else
16590 as_basename=false
16591fi
16592
Matthias Kloseb9621712010-04-24 17:59:49 +000016593if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16594 as_dirname=dirname
16595else
16596 as_dirname=false
16597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599as_me=`$as_basename -- "$0" ||
16600$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16601 X"$0" : 'X\(//\)$' \| \
16602 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016603$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604 sed '/^.*\/\([^/][^/]*\)\/*$/{
16605 s//\1/
16606 q
16607 }
16608 /^X\/\(\/\/\)$/{
16609 s//\1/
16610 q
16611 }
16612 /^X\/\(\/\).*/{
16613 s//\1/
16614 q
16615 }
16616 s/.*/./; q'`
16617
Matthias Kloseb9621712010-04-24 17:59:49 +000016618# Avoid depending upon Character Ranges.
16619as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16620as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16621as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16622as_cr_digits='0123456789'
16623as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624
16625ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016626case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016628 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016630 xy) ECHO_C='\c';;
16631 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16632 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633 esac;;
16634*)
16635 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016637
Martin v. Löwis11437992002-04-12 09:54:03 +000016638rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639if test -d conf$$.dir; then
16640 rm -f conf$$.dir/conf$$.file
16641else
16642 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016643 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016645if (echo >conf$$.file) 2>/dev/null; then
16646 if ln -s conf$$.file conf$$ 2>/dev/null; then
16647 as_ln_s='ln -s'
16648 # ... but there are two gotchas:
16649 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16650 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016651 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016652 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016653 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016654 elif ln conf$$.file conf$$ 2>/dev/null; then
16655 as_ln_s=ln
16656 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016657 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016659else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016660 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16663rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016664
Matthias Kloseb9621712010-04-24 17:59:49 +000016665
16666# as_fn_mkdir_p
16667# -------------
16668# Create "$as_dir" as a directory, including parents if necessary.
16669as_fn_mkdir_p ()
16670{
16671
16672 case $as_dir in #(
16673 -*) as_dir=./$as_dir;;
16674 esac
16675 test -d "$as_dir" || eval $as_mkdir_p || {
16676 as_dirs=
16677 while :; do
16678 case $as_dir in #(
16679 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16680 *) as_qdir=$as_dir;;
16681 esac
16682 as_dirs="'$as_qdir' $as_dirs"
16683 as_dir=`$as_dirname -- "$as_dir" ||
16684$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16685 X"$as_dir" : 'X\(//\)[^/]' \| \
16686 X"$as_dir" : 'X\(//\)$' \| \
16687 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16688$as_echo X"$as_dir" |
16689 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16690 s//\1/
16691 q
16692 }
16693 /^X\(\/\/\)[^/].*/{
16694 s//\1/
16695 q
16696 }
16697 /^X\(\/\/\)$/{
16698 s//\1/
16699 q
16700 }
16701 /^X\(\/\).*/{
16702 s//\1/
16703 q
16704 }
16705 s/.*/./; q'`
16706 test -d "$as_dir" && break
16707 done
16708 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016709 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016710
16711
16712} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016713if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016714 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016715else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016716 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016717 as_mkdir_p=false
16718fi
16719
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016720
16721# as_fn_executable_p FILE
16722# -----------------------
16723# Test if FILE is an executable regular file.
16724as_fn_executable_p ()
16725{
16726 test -f "$1" && test -x "$1"
16727} # as_fn_executable_p
16728as_test_x='test -x'
16729as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016730
16731# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016732as_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 +000016733
16734# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016735as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016736
16737
Martin v. Löwis11437992002-04-12 09:54:03 +000016738exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016739## ----------------------------------- ##
16740## Main body of $CONFIG_STATUS script. ##
16741## ----------------------------------- ##
16742_ASEOF
16743test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016744
Matthias Kloseb9621712010-04-24 17:59:49 +000016745cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16746# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016747# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748# values after options handling.
16749ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016750This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016751generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016752
16753 CONFIG_FILES = $CONFIG_FILES
16754 CONFIG_HEADERS = $CONFIG_HEADERS
16755 CONFIG_LINKS = $CONFIG_LINKS
16756 CONFIG_COMMANDS = $CONFIG_COMMANDS
16757 $ $0 $@
16758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759on `(hostname || uname -n) 2>/dev/null | sed 1q`
16760"
16761
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
16763
Matthias Kloseb9621712010-04-24 17:59:49 +000016764case $ac_config_files in *"
16765"*) set x $ac_config_files; shift; ac_config_files=$*;;
16766esac
16767
16768case $ac_config_headers in *"
16769"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16770esac
16771
16772
16773cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016774# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016775config_files="$ac_config_files"
16776config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016779
Matthias Kloseb9621712010-04-24 17:59:49 +000016780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016781ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016782\`$as_me' instantiates files and other configuration actions
16783from templates according to the current configuration. Unless the files
16784and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
Matthias Kloseb9621712010-04-24 17:59:49 +000016786Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016787
16788 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016790 --config print configuration, then exit
16791 -q, --quiet, --silent
16792 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 -d, --debug don't remove temporary files
16794 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016795 --file=FILE[:TEMPLATE]
16796 instantiate the configuration file FILE
16797 --header=FILE[:TEMPLATE]
16798 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016799
16800Configuration files:
16801$config_files
16802
16803Configuration headers:
16804$config_headers
16805
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016806Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16810ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016811ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016812python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016813configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016815
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016816Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016817This config.status script is free software; the Free Software Foundation
16818gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819
16820ac_pwd='$ac_pwd'
16821srcdir='$srcdir'
16822INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016823MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016824test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016825_ACEOF
16826
Matthias Kloseb9621712010-04-24 17:59:49 +000016827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16828# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016829ac_need_defaults=:
16830while test $# != 0
16831do
16832 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016833 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16835 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016836 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016838 --*=)
16839 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16840 ac_optarg=
16841 ac_shift=:
16842 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016844 ac_option=$1
16845 ac_optarg=$2
16846 ac_shift=shift
16847 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 esac
16849
Skip Montanaro6dead952003-09-25 14:50:04 +000016850 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016852 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16853 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 $as_echo "$ac_cs_version"; exit ;;
16856 --config | --confi | --conf | --con | --co | --c )
16857 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016859 debug=: ;;
16860 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016861 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 case $ac_optarg in
16863 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016864 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016865 esac
16866 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 ac_need_defaults=false;;
16868 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016869 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016870 case $ac_optarg in
16871 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16872 esac
16873 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875 --he | --h)
16876 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016877 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016878Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016881 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16882 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16883 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016884
16885 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016886 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016887Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016888
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016891
16892 esac
16893 shift
16894done
16895
Skip Montanaro6dead952003-09-25 14:50:04 +000016896ac_configure_extra_args=
16897
16898if $ac_cs_silent; then
16899 exec 6>/dev/null
16900 ac_configure_extra_args="$ac_configure_extra_args --silent"
16901fi
16902
16903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016904cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016905if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016906 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016907 shift
16908 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16909 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016911 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016912fi
16913
Martin v. Löwis11437992002-04-12 09:54:03 +000016914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916exec 5>>config.log
16917{
16918 echo
16919 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16920## Running $as_me. ##
16921_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016926cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016928
Matthias Kloseb9621712010-04-24 17:59:49 +000016929cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016930
16931# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016932for ac_config_target in $ac_config_targets
16933do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016934 case $ac_config_target in
16935 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16936 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16937 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016938 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16939 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016940 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16941 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016942 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016943 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016944 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945
Victor Stinnere0be4232011-10-25 13:06:09 +020016946 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 esac
16948done
16949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950
Martin v. Löwis11437992002-04-12 09:54:03 +000016951# If the user did not use the arguments to specify the items to instantiate,
16952# then the envvar interface is used. Set only those that are not.
16953# We use the long form for the default assignment because of an extremely
16954# bizarre bug on SunOS 4.1.3.
16955if $ac_need_defaults; then
16956 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16957 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16958fi
16959
Skip Montanaro6dead952003-09-25 14:50:04 +000016960# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016962# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963# Hook for its removal unless debugging.
16964# Note that there is a small window in which the directory will not be cleaned:
16965# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016966$debug ||
16967{
Victor Stinnere0be4232011-10-25 13:06:09 +020016968 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016969 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016970 : "${ac_tmp:=$tmp}"
16971 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016973 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016974}
Martin v. Löwis11437992002-04-12 09:54:03 +000016975# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016979 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016980} ||
16981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982 tmp=./conf$$-$RANDOM
16983 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016984} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016985ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016986
Matthias Kloseb9621712010-04-24 17:59:49 +000016987# Set up the scripts for CONFIG_FILES section.
16988# No need to generate them if there are no CONFIG_FILES.
16989# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016990if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016991
Matthias Kloseb9621712010-04-24 17:59:49 +000016992
16993ac_cr=`echo X | tr X '\015'`
16994# On cygwin, bash can eat \r inside `` if the user requested igncr.
16995# But we know of no other shell where ac_cr would be empty at this
16996# point, so we can use a bashism as a fallback.
16997if test "x$ac_cr" = x; then
16998 eval ac_cr=\$\'\\r\'
16999fi
17000ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17001if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017002 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017003else
17004 ac_cs_awk_cr=$ac_cr
17005fi
17006
Victor Stinnere0be4232011-10-25 13:06:09 +020017007echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017008_ACEOF
17009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010
Matthias Kloseb9621712010-04-24 17:59:49 +000017011{
17012 echo "cat >conf$$subs.awk <<_ACEOF" &&
17013 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17014 echo "_ACEOF"
17015} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017016 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17017ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018ac_delim='%!_!# '
17019for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017020 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017021 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17024 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025 break
17026 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017027 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028 else
17029 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031done
Matthias Kloseb9621712010-04-24 17:59:49 +000017032rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033
Matthias Kloseb9621712010-04-24 17:59:49 +000017034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017035cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017037sed -n '
17038h
17039s/^/S["/; s/!.*/"]=/
17040p
17041g
17042s/^[^!]*!//
17043:repl
17044t repl
17045s/'"$ac_delim"'$//
17046t delim
17047:nl
17048h
17049s/\(.\{148\}\)..*/\1/
17050t more1
17051s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17052p
17053n
17054b repl
17055:more1
17056s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17057p
17058g
17059s/.\{148\}//
17060t nl
17061:delim
17062h
17063s/\(.\{148\}\)..*/\1/
17064t more2
17065s/["\\]/\\&/g; s/^/"/; s/$/"/
17066p
17067b
17068:more2
17069s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17070p
17071g
17072s/.\{148\}//
17073t delim
17074' <conf$$subs.awk | sed '
17075/^[^""]/{
17076 N
17077 s/\n//
17078}
17079' >>$CONFIG_STATUS || ac_write_fail=1
17080rm -f conf$$subs.awk
17081cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17082_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017083cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017084 for (key in S) S_is_set[key] = 1
17085 FS = ""
17086
17087}
17088{
17089 line = $ 0
17090 nfields = split(line, field, "@")
17091 substed = 0
17092 len = length(field[1])
17093 for (i = 2; i < nfields; i++) {
17094 key = field[i]
17095 keylen = length(key)
17096 if (S_is_set[key]) {
17097 value = S[key]
17098 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17099 len += length(value) + length(field[++i])
17100 substed = 1
17101 } else
17102 len += 1 + keylen
17103 }
17104
17105 print line
17106}
17107
17108_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017110cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17111if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17112 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17113else
17114 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017115fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017116 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017117_ACEOF
17118
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017119# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17120# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017121# trailing colons and then remove the whole line if VPATH becomes empty
17122# (actually we leave an empty line to preserve line numbers).
17123if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017124 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17125h
17126s///
17127s/^/:/
17128s/[ ]*$/:/
17129s/:\$(srcdir):/:/g
17130s/:\${srcdir}:/:/g
17131s/:@srcdir@:/:/g
17132s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017134x
17135s/\(=[ ]*\).*/\1/
17136G
17137s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138s/^[^=]*=[ ]*$//
17139}'
17140fi
17141
Matthias Kloseb9621712010-04-24 17:59:49 +000017142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017143fi # test -n "$CONFIG_FILES"
17144
Matthias Kloseb9621712010-04-24 17:59:49 +000017145# Set up the scripts for CONFIG_HEADERS section.
17146# No need to generate them if there are no CONFIG_HEADERS.
17147# This happens for instance with `./config.status Makefile'.
17148if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017149cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017150BEGIN {
17151_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152
Matthias Kloseb9621712010-04-24 17:59:49 +000017153# Transform confdefs.h into an awk script `defines.awk', embedded as
17154# here-document in config.status, that substitutes the proper values into
17155# config.h.in to produce config.h.
17156
17157# Create a delimiter string that does not exist in confdefs.h, to ease
17158# handling of long lines.
17159ac_delim='%!_!# '
17160for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017161 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17162 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017163 break
17164 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017165 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017166 else
17167 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17168 fi
17169done
17170
17171# For the awk script, D is an array of macro values keyed by name,
17172# likewise P contains macro parameters if any. Preserve backslash
17173# newline sequences.
17174
17175ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17176sed -n '
17177s/.\{148\}/&'"$ac_delim"'/g
17178t rset
17179:rset
17180s/^[ ]*#[ ]*define[ ][ ]*/ /
17181t def
17182d
17183:def
17184s/\\$//
17185t bsnl
17186s/["\\]/\\&/g
17187s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17188D["\1"]=" \3"/p
17189s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17190d
17191:bsnl
17192s/["\\]/\\&/g
17193s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17194D["\1"]=" \3\\\\\\n"\\/p
17195t cont
17196s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17197t cont
17198d
17199:cont
17200n
17201s/.\{148\}/&'"$ac_delim"'/g
17202t clear
17203:clear
17204s/\\$//
17205t bsnlc
17206s/["\\]/\\&/g; s/^/"/; s/$/"/p
17207d
17208:bsnlc
17209s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17210b cont
17211' <confdefs.h | sed '
17212s/'"$ac_delim"'/"\\\
17213"/g' >>$CONFIG_STATUS || ac_write_fail=1
17214
17215cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17216 for (key in D) D_is_set[key] = 1
17217 FS = ""
17218}
17219/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17220 line = \$ 0
17221 split(line, arg, " ")
17222 if (arg[1] == "#") {
17223 defundef = arg[2]
17224 mac1 = arg[3]
17225 } else {
17226 defundef = substr(arg[1], 2)
17227 mac1 = arg[2]
17228 }
17229 split(mac1, mac2, "(") #)
17230 macro = mac2[1]
17231 prefix = substr(line, 1, index(line, defundef) - 1)
17232 if (D_is_set[macro]) {
17233 # Preserve the white space surrounding the "#".
17234 print prefix "define", macro P[macro] D[macro]
17235 next
17236 } else {
17237 # Replace #undef with comments. This is necessary, for example,
17238 # in the case of _POSIX_SOURCE, which is predefined and required
17239 # on some systems where configure will not decide to define it.
17240 if (defundef == "undef") {
17241 print "/*", prefix defundef, macro, "*/"
17242 next
17243 }
17244 }
17245}
17246{ print }
17247_ACAWK
17248_ACEOF
17249cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017250 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017251fi # test -n "$CONFIG_HEADERS"
17252
17253
17254eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17255shift
17256for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257do
17258 case $ac_tag in
17259 :[FHLC]) ac_mode=$ac_tag; continue;;
17260 esac
17261 case $ac_mode$ac_tag in
17262 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017263 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264 :[FH]-) ac_tag=-:-;;
17265 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17266 esac
17267 ac_save_IFS=$IFS
17268 IFS=:
17269 set x $ac_tag
17270 IFS=$ac_save_IFS
17271 shift
17272 ac_file=$1
17273 shift
17274
17275 case $ac_mode in
17276 :L) ac_source=$1;;
17277 :[FH])
17278 ac_file_inputs=
17279 for ac_f
17280 do
17281 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017282 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283 *) # Look for the file first in the build tree, then in the source tree
17284 # (if the path is not absolute). The absolute path cannot be DOS-style,
17285 # because $ac_f cannot contain `:'.
17286 test -f "$ac_f" ||
17287 case $ac_f in
17288 [\\/$]*) false;;
17289 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17290 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017291 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017293 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17294 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 done
17296
17297 # Let's still pretend it is `configure' which instantiates (i.e., don't
17298 # use $as_me), people would be surprised to read:
17299 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017300 configure_input='Generated from '`
17301 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17302 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 if test x"$ac_file" != x-; then
17304 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017305 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17306$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 # Neutralize special characters interpreted by sed in replacement strings.
17309 case $configure_input in #(
17310 *\&* | *\|* | *\\* )
17311 ac_sed_conf_input=`$as_echo "$configure_input" |
17312 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17313 *) ac_sed_conf_input=$configure_input;;
17314 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315
17316 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017317 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17318 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319 esac
17320 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 esac
17322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017324$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017325 X"$ac_file" : 'X\(//\)[^/]' \| \
17326 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017328$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17330 s//\1/
17331 q
17332 }
17333 /^X\(\/\/\)[^/].*/{
17334 s//\1/
17335 q
17336 }
17337 /^X\(\/\/\)$/{
17338 s//\1/
17339 q
17340 }
17341 /^X\(\/\).*/{
17342 s//\1/
17343 q
17344 }
17345 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017346 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 ac_builddir=.
17348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349case "$ac_dir" in
17350.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17351*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017352 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017354 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355 case $ac_top_builddir_sub in
17356 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17357 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17358 esac ;;
17359esac
17360ac_abs_top_builddir=$ac_pwd
17361ac_abs_builddir=$ac_pwd$ac_dir_suffix
17362# for backward compatibility:
17363ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017364
17365case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017367 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 ac_top_srcdir=$ac_top_builddir_sub
17369 ac_abs_top_srcdir=$ac_pwd ;;
17370 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017371 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 ac_top_srcdir=$srcdir
17373 ac_abs_top_srcdir=$srcdir ;;
17374 *) # Relative name.
17375 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17376 ac_top_srcdir=$ac_top_build_prefix$srcdir
17377 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017378esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017380
Martin v. Löwis11437992002-04-12 09:54:03 +000017381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 case $ac_mode in
17383 :F)
17384 #
17385 # CONFIG_FILE
17386 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017387
17388 case $INSTALL in
17389 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017391 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017392 ac_MKDIR_P=$MKDIR_P
17393 case $MKDIR_P in
17394 [\\/$]* | ?:[\\/]* ) ;;
17395 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17396 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017397_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398
Matthias Kloseb9621712010-04-24 17:59:49 +000017399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400# If the template does not know about datarootdir, expand it.
17401# FIXME: This hack should be removed a few years after 2.60.
17402ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017403ac_sed_dataroot='
17404/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405 p
17406 q
17407}
17408/@datadir@/p
17409/@docdir@/p
17410/@infodir@/p
17411/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017412/@mandir@/p'
17413case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414*datarootdir*) ac_datarootdir_seen=yes;;
17415*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17417$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017419cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 ac_datarootdir_hack='
17421 s&@datadir@&$datadir&g
17422 s&@docdir@&$docdir&g
17423 s&@infodir@&$infodir&g
17424 s&@localedir@&$localedir&g
17425 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017426 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427esac
17428_ACEOF
17429
17430# Neutralize VPATH when `$srcdir' = `.'.
17431# Shell code in configure.ac might set extrasub.
17432# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17434ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017435$extrasub
17436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017438:t
17439/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017440s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017442s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443s&@srcdir@&$ac_srcdir&;t t
17444s&@abs_srcdir@&$ac_abs_srcdir&;t t
17445s&@top_srcdir@&$ac_top_srcdir&;t t
17446s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17447s&@builddir@&$ac_builddir&;t t
17448s&@abs_builddir@&$ac_abs_builddir&;t t
17449s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17450s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017451s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017453"
Victor Stinnere0be4232011-10-25 13:06:09 +020017454eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17455 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017458 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17459 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17460 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017462which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017463$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017464which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017465
Victor Stinnere0be4232011-10-25 13:06:09 +020017466 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017468 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17469 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017470 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472 ;;
17473 :H)
17474 #
17475 # CONFIG_HEADER
17476 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017478 {
17479 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017480 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17481 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017482 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017483 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017484 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17485$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017487 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017488 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017489 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017490 fi
17491 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017492 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017493 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017494 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498
17499 esac
17500
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017501
17502 case $ac_file$ac_mode in
17503 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17504
17505 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506done # for ac_tag
17507
Guido van Rossum627b2d71993-12-24 10:39:16 +000017508
Matthias Kloseb9621712010-04-24 17:59:49 +000017509as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017510_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017511ac_clean_files=$ac_clean_files_save
17512
Matthias Kloseb9621712010-04-24 17:59:49 +000017513test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017514 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017515
Martin v. Löwis11437992002-04-12 09:54:03 +000017516
17517# configure is writing to config.log, and then calls config.status.
17518# config.status does its own redirection, appending to config.log.
17519# Unfortunately, on DOS this fails, as config.log is still kept open
17520# by configure, so config.status won't be able to write to it; its
17521# output is simply discarded. So we exec the FD to /dev/null,
17522# effectively closing config.log, so it can be properly (re)opened and
17523# appended to by config.status. When coming back to configure, we
17524# need to make the FD available again.
17525if test "$no_create" != yes; then
17526 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017527 ac_config_status_args=
17528 test "$silent" = yes &&
17529 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017530 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017531 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017532 exec 5>>config.log
17533 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17534 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017535 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017536fi
17537if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17539$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017540fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017541
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017542
Christian Heimes75ed8902013-11-20 01:11:18 +010017543echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017544if test ! -f Modules/Setup
17545then
17546 cp $srcdir/Modules/Setup.dist Modules/Setup
17547fi
17548
Christian Heimes75ed8902013-11-20 01:11:18 +010017549echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017550if test ! -f Modules/Setup.local
17551then
17552 echo "# Edit this file for local setup changes" >Modules/Setup.local
17553fi
17554
Christian Heimes75ed8902013-11-20 01:11:18 +010017555echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017556$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17557 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017558 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017559mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017560
17561if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17562 echo "" >&6
17563 echo "" >&6
17564 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17565 echo "please run ./configure --with-optimizations" >&6
17566 echo "" >&6
17567 echo "" >&6
17568fi
17569