blob: a5d6e8d6bb192bbd193f595096b5bdbb5045df16 [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 Petersone6c9d242010-03-30 17:34:47 +00006715 # Python doesn't violate C99 aliasing rules, but older versions of
6716 # GCC produce warnings for legal Python code. Enable
6717 # -fno-strict-aliasing on versions of GCC that support but produce
6718 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6720$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721 ac_save_cc="$CC"
6722 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006723 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006724 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006729
Matthias Kloseb159a552010-04-25 21:00:44 +00006730
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006731int
6732main ()
6733{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006734
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006735 ;
6736 return 0;
6737}
Matthias Kloseb159a552010-04-25 21:00:44 +00006738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006740if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006741
6742 CC="$ac_save_cc -fstrict-aliasing"
6743 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006745/* end confdefs.h. */
6746
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006747 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006748int
6749main ()
6750{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006751double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006752 ;
6753 return 0;
6754}
Matthias Kloseb159a552010-04-25 21:00:44 +00006755
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006757if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006758
6759 ac_cv_no_strict_aliasing=no
6760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761else
Matthias Kloseb159a552010-04-25 21:00:44 +00006762
6763 ac_cv_no_strict_aliasing=yes
6764
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006765fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006767
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006768else
Matthias Kloseb159a552010-04-25 21:00:44 +00006769
6770 ac_cv_no_strict_aliasing=no
6771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006774fi
6775
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006776 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6779$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006780 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781 then
6782 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6783 fi
6784
Zachary Ware5af85642015-12-21 12:09:17 -06006785 # ICC doesn't recognize the option, but only emits a warning
6786 ## XXX does it emit an unused result warning and can it be disabled?
6787 case "$CC" in
6788 *icc*)
6789 ac_cv_disable_unused_result_warning=no
6790 ;;
6791 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6793$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6794 ac_save_cc="$CC"
6795 CC="$CC -Wunused-result -Werror"
6796 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006797 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006798 $as_echo_n "(cached) " >&6
6799else
6800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6801/* end confdefs.h. */
6802
6803
6804int
6805main ()
6806{
6807
6808 ;
6809 return 0;
6810}
6811
6812_ACEOF
6813if ac_fn_c_try_compile "$LINENO"; then :
6814
6815 ac_cv_disable_unused_result_warning=yes
6816
6817else
6818
6819 ac_cv_disable_unused_result_warning=no
6820
6821fi
6822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6823fi
6824
6825 CFLAGS="$save_CFLAGS"
6826 CC="$ac_save_cc"
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6828$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006829 ;;
6830 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006831
6832 if test $ac_cv_disable_unused_result_warning = yes
6833 then
6834 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6835 fi
6836
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6838$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6839 ac_save_cc="$CC"
6840 CC="$CC -Wsign-compare"
6841 save_CFLAGS="$CFLAGS"
6842 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6843 $as_echo_n "(cached) " >&6
6844else
6845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6846/* end confdefs.h. */
6847
6848
6849int
6850main ()
6851{
6852
6853 ;
6854 return 0;
6855}
6856
6857_ACEOF
6858if ac_fn_c_try_compile "$LINENO"; then :
6859
6860 ac_cv_enable_sign_compare_warning=yes
6861
6862else
6863
6864 ac_cv_enable_sign_compare_warning=no
6865
6866fi
6867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6868fi
6869
6870 CFLAGS="$save_CFLAGS"
6871 CC="$ac_save_cc"
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6873$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6874
6875 if test $ac_cv_enable_sign_compare_warning = yes
6876 then
6877 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6878 fi
6879
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6881$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6882 ac_save_cc="$CC"
6883 CC="$CC -Wunreachable-code"
6884 save_CFLAGS="$CFLAGS"
6885 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6886 $as_echo_n "(cached) " >&6
6887else
6888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6889/* end confdefs.h. */
6890
6891
6892int
6893main ()
6894{
6895
6896 ;
6897 return 0;
6898}
6899
6900_ACEOF
6901if ac_fn_c_try_compile "$LINENO"; then :
6902
6903 ac_cv_enable_unreachable_code_warning=yes
6904
6905else
6906
6907 ac_cv_enable_unreachable_code_warning=no
6908
6909fi
6910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911fi
6912
6913 CFLAGS="$save_CFLAGS"
6914 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006915
6916 # Don't enable unreachable code warning in debug mode, since it usually
6917 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006918 # Issue #24324: Unfortunately, the unreachable code warning does not work
6919 # correctly on gcc and has been silently removed from the compiler.
6920 # It is supported on clang but on OS X systems gcc may be an alias
6921 # for clang. Try to determine if the compiler is not really gcc and,
6922 # if so, only then enable the warning.
6923 if test $ac_cv_enable_unreachable_code_warning = yes && \
6924 test "$Py_DEBUG" != "true" && \
6925 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006926 then
6927 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006928 else
6929 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006930 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6932$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6935 # support. Without this, treatment of subnormals doesn't follow
6936 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006937 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938 alpha*)
6939 BASECFLAGS="$BASECFLAGS -mieee"
6940 ;;
6941 esac
6942
6943 case $ac_sys_system in
6944 SCO_SV*)
6945 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6946 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006947
6948 # is there any other compiler on Darwin besides gcc?
6949 Darwin*)
6950 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6951 # used to be here, but non-Apple gcc doesn't accept them.
6952 if test "${CC}" = gcc
6953 then
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006955$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006956 case "${UNIVERSALSDK}" in
6957 */MacOSX10.4u.sdk)
6958 # Build using 10.4 SDK, force usage of gcc when the
6959 # compiler is gcc, otherwise the user will get very
6960 # confusing error messages when building on OSX 10.6
6961 CC=gcc-4.0
6962 CPP=cpp-4.0
6963 ;;
6964 esac
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006966$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006967 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968
Ned Deily87adb6e2013-10-18 21:09:56 -07006969 if test "${enable_universalsdk}"
6970 then
6971 case "$UNIVERSAL_ARCHS" in
6972 32-bit)
6973 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6974 LIPO_32BIT_FLAGS=""
6975 ARCH_RUN_32BIT=""
6976 ;;
6977 64-bit)
6978 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6979 LIPO_32BIT_FLAGS=""
6980 ARCH_RUN_32BIT="true"
6981 ;;
6982 all)
6983 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6984 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6985 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6986 ;;
6987 intel)
6988 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6989 LIPO_32BIT_FLAGS="-extract i386"
6990 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6991 ;;
6992 intel-32)
6993 UNIVERSAL_ARCH_FLAGS="-arch i386"
6994 LIPO_32BIT_FLAGS=""
6995 ARCH_RUN_32BIT=""
6996 ;;
6997 3-way)
6998 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6999 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7000 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7001 ;;
7002 *)
7003 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7004 ;;
7005 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006
Ned Deily87adb6e2013-10-18 21:09:56 -07007007 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7008 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7009 if test "${UNIVERSALSDK}" != "/"
7010 then
7011 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7012 fi
7013 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014
Ned Deily87adb6e2013-10-18 21:09:56 -07007015 # Calculate an appropriate deployment target for this build:
7016 # The deployment target value is used explicitly to enable certain
7017 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007018 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007019 # component of the string returned by distutils.get_platform().
7020 #
7021 # Use the value from:
7022 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7023 # 2. the operating system version of the build machine if >= 10.6
7024 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7025 # below to pick either 10.3, 10.4, or 10.5 as the target.
7026 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007027
Ned Deily87adb6e2013-10-18 21:09:56 -07007028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7029$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007030 cur_target_major=`sw_vers -productVersion | \
7031 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7032 cur_target_minor=`sw_vers -productVersion | \
7033 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7034 cur_target="${cur_target_major}.${cur_target_minor}"
7035 if test ${cur_target_major} -eq 10 && \
7036 test ${cur_target_minor} -ge 3 && \
7037 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007038 then
Ned Deily36820b62014-06-25 13:44:22 -07007039 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007040 cur_target=10.3
7041 if test ${enable_universalsdk}
7042 then
7043 case "$UNIVERSAL_ARCHS" in
7044 all|3-way|intel|64-bit)
7045 # These configurations were first supported in 10.5
7046 cur_target='10.5'
7047 ;;
7048 esac
7049 else
7050 if test `/usr/bin/arch` = "i386"
7051 then
7052 # 10.4 was the first release to support Intel archs
7053 cur_target="10.4"
7054 fi
7055 fi
7056 fi
7057 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007058
Ned Deily87adb6e2013-10-18 21:09:56 -07007059 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7060 # environment with a value that is the same as what we'll use
7061 # in the Makefile to ensure that we'll get the same compiler
7062 # environment during configure and build time.
7063 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7064 export MACOSX_DEPLOYMENT_TARGET
7065 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7067$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007068
Ned Deily87adb6e2013-10-18 21:09:56 -07007069 # end of Darwin* tests
7070 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007071 esac
7072 ;;
7073
7074*)
7075 case $ac_sys_system in
7076 OpenUNIX*|UnixWare*)
7077 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7078 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079 SCO_SV*)
7080 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7081 ;;
7082 esac
7083 ;;
7084esac
7085
Zachary Ware5af85642015-12-21 12:09:17 -06007086# ICC needs -fp-model strict or floats behave badly
7087case "$CC" in
7088*icc*)
7089 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7090 ;;
7091esac
7092
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007093if test "$Py_DEBUG" = 'true'; then
7094 :
7095else
7096 OPT="-DNDEBUG $OPT"
7097fi
7098
7099if test "$ac_arch_flags"
7100then
7101 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7102fi
7103
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104# On some compilers, pthreads are available without further options
7105# (e.g. MacOS X). On some of these systems, the compiler will not
7106# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7107# So we have to see first whether pthreads are available without
7108# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7110$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007111if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115 ac_cv_pthread_is_default=no
7116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007118/* end confdefs.h. */
7119
Stefan Krah7dba5942012-11-22 22:49:11 +01007120#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121#include <pthread.h>
7122
7123void* routine(void* p){return NULL;}
7124
7125int main(){
7126 pthread_t p;
7127 if(pthread_create(&p,NULL,routine,NULL)!=0)
7128 return 1;
7129 (void)pthread_detach(p);
7130 return 0;
7131}
7132
7133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007134if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135
7136 ac_cv_pthread_is_default=yes
7137 ac_cv_kthread=no
7138 ac_cv_pthread=no
7139
7140else
Matthias Kloseb9621712010-04-24 17:59:49 +00007141 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007145fi
7146
7147
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007148fi
7149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7151$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007152
7153
7154if test $ac_cv_pthread_is_default = yes
7155then
7156 ac_cv_kpthread=no
7157else
7158# -Kpthread, if available, provides the right #defines
7159# and linker options to make pthread_create available
7160# Some compilers won't report that they do not support -Kpthread,
7161# so we need to run a program to see whether it really made the
7162# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7164$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007165if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007167else
7168 ac_save_cc="$CC"
7169CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007170if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007171 ac_cv_kpthread=no
7172else
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007174/* end confdefs.h. */
7175
Stefan Krah7dba5942012-11-22 22:49:11 +01007176#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177#include <pthread.h>
7178
7179void* routine(void* p){return NULL;}
7180
7181int main(){
7182 pthread_t p;
7183 if(pthread_create(&p,NULL,routine,NULL)!=0)
7184 return 1;
7185 (void)pthread_detach(p);
7186 return 0;
7187}
7188
7189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007190if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191 ac_cv_kpthread=yes
7192else
Matthias Kloseb9621712010-04-24 17:59:49 +00007193 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007197fi
7198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199CC="$ac_save_cc"
7200fi
7201
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7203$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007204fi
7205
7206if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7207then
7208# -Kthread, if available, provides the right #defines
7209# and linker options to make pthread_create available
7210# Some compilers won't report that they do not support -Kthread,
7211# so we need to run a program to see whether it really made the
7212# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7214$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007215if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217else
7218 ac_save_cc="$CC"
7219CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007220if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007221 ac_cv_kthread=no
7222else
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224/* end confdefs.h. */
7225
Stefan Krah7dba5942012-11-22 22:49:11 +01007226#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007227#include <pthread.h>
7228
7229void* routine(void* p){return NULL;}
7230
7231int main(){
7232 pthread_t p;
7233 if(pthread_create(&p,NULL,routine,NULL)!=0)
7234 return 1;
7235 (void)pthread_detach(p);
7236 return 0;
7237}
7238
7239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007240if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007241 ac_cv_kthread=yes
7242else
Matthias Kloseb9621712010-04-24 17:59:49 +00007243 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7246 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247fi
7248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249CC="$ac_save_cc"
7250fi
7251
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7253$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254fi
7255
7256if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7257then
7258# -pthread, if available, provides the right #defines
7259# and linker options to make pthread_create available
7260# Some compilers won't report that they do not support -pthread,
7261# so we need to run a program to see whether it really made the
7262# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7264$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007265if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267else
7268 ac_save_cc="$CC"
7269CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007270if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271 ac_cv_pthread=no
7272else
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274/* end confdefs.h. */
7275
Stefan Krah7dba5942012-11-22 22:49:11 +01007276#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277#include <pthread.h>
7278
7279void* routine(void* p){return NULL;}
7280
7281int main(){
7282 pthread_t p;
7283 if(pthread_create(&p,NULL,routine,NULL)!=0)
7284 return 1;
7285 (void)pthread_detach(p);
7286 return 0;
7287}
7288
7289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291 ac_cv_pthread=yes
7292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297fi
7298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299CC="$ac_save_cc"
7300fi
7301
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7303$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304fi
7305
7306# If we have set a CC compiler flag for thread support then
7307# check if it works for CXX, too.
7308ac_cv_cxx_thread=no
7309if test ! -z "$CXX"
7310then
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7312$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313ac_save_cxx="$CXX"
7314
7315if test "$ac_cv_kpthread" = "yes"
7316then
7317 CXX="$CXX -Kpthread"
7318 ac_cv_cxx_thread=yes
7319elif test "$ac_cv_kthread" = "yes"
7320then
7321 CXX="$CXX -Kthread"
7322 ac_cv_cxx_thread=yes
7323elif test "$ac_cv_pthread" = "yes"
7324then
7325 CXX="$CXX -pthread"
7326 ac_cv_cxx_thread=yes
7327fi
7328
7329if test $ac_cv_cxx_thread = yes
7330then
7331 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7332 $CXX -c conftest.$ac_ext 2>&5
7333 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7334 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7335 then
7336 ac_cv_cxx_thread=yes
7337 else
7338 ac_cv_cxx_thread=no
7339 fi
7340 rm -fr conftest*
7341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7343$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344fi
7345CXX="$ac_save_cxx"
7346
7347
7348# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7350$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007351if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007352 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353else
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355/* end confdefs.h. */
7356#include <stdlib.h>
7357#include <stdarg.h>
7358#include <string.h>
7359#include <float.h>
7360
7361int
7362main ()
7363{
7364
7365 ;
7366 return 0;
7367}
7368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007369if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370 ac_cv_header_stdc=yes
7371else
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7375
7376if test $ac_cv_header_stdc = yes; then
7377 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007379/* end confdefs.h. */
7380#include <string.h>
7381
7382_ACEOF
7383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 $EGREP "memchr" >/dev/null 2>&1; then :
7385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386else
7387 ac_cv_header_stdc=no
7388fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007389rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390
7391fi
7392
7393if test $ac_cv_header_stdc = yes; then
7394 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396/* end confdefs.h. */
7397#include <stdlib.h>
7398
7399_ACEOF
7400if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 $EGREP "free" >/dev/null 2>&1; then :
7402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403else
7404 ac_cv_header_stdc=no
7405fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007406rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407
7408fi
7409
7410if test $ac_cv_header_stdc = yes; then
7411 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007412 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 :
7414else
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416/* end confdefs.h. */
7417#include <ctype.h>
7418#include <stdlib.h>
7419#if ((' ' & 0x0FF) == 0x020)
7420# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7421# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7422#else
7423# define ISLOWER(c) \
7424 (('a' <= (c) && (c) <= 'i') \
7425 || ('j' <= (c) && (c) <= 'r') \
7426 || ('s' <= (c) && (c) <= 'z'))
7427# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7428#endif
7429
7430#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7431int
7432main ()
7433{
7434 int i;
7435 for (i = 0; i < 256; i++)
7436 if (XOR (islower (i), ISLOWER (i))
7437 || toupper (i) != TOUPPER (i))
7438 return 2;
7439 return 0;
7440}
7441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007442if ac_fn_c_try_run "$LINENO"; then :
7443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449fi
7450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451fi
7452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7454$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455if test $ac_cv_header_stdc = yes; then
7456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458
7459fi
7460
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007461for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007462fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007463ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007464sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007465unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007466poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007467sys/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 +01007468sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007469sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007470sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007471sys/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 -07007472libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007473bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007474sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007475do :
7476 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7477ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007478if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007479 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007480#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
7482
7483fi
7484
Guido van Rossum627b2d71993-12-24 10:39:16 +00007485done
7486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007487ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007488for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7491$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007492if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007494else
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007496/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007497#include <sys/types.h>
7498#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
Martin v. Löwis11437992002-04-12 09:54:03 +00007500int
7501main ()
7502{
7503if ((DIR *) 0)
7504return 0;
7505 ;
7506 return 0;
7507}
7508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007511else
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007516eval ac_res=\$$as_ac_Header
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7518$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007521#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007522_ACEOF
7523
7524ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007526
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007527done
7528# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7529if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7531$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007532if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534else
Martin v. Löwis11437992002-04-12 09:54:03 +00007535 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539/* Override any GCC internal prototype to avoid an error.
7540 Use char because int might match the return type of a GCC
7541 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007542#ifdef __cplusplus
7543extern "C"
7544#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007545char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007546int
7547main ()
7548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 ;
7551 return 0;
7552}
7553_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554for ac_lib in '' dir; do
7555 if test -z "$ac_lib"; then
7556 ac_res="none required"
7557 else
7558 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007559 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007564rm -f core conftest.err conftest.$ac_objext \
7565 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007566 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007567 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007569done
Victor Stinnere0be4232011-10-25 13:06:09 +02007570if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572else
7573 ac_cv_search_opendir=no
7574fi
7575rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007576LIBS=$ac_func_search_save_LIBS
7577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7579$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007585
Michael W. Hudson54241132001-12-07 15:38:26 +00007586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7588$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007589if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007591else
7592 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007596/* Override any GCC internal prototype to avoid an error.
7597 Use char because int might match the return type of a GCC
7598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007599#ifdef __cplusplus
7600extern "C"
7601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007602char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007603int
7604main ()
7605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007607 ;
7608 return 0;
7609}
7610_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611for ac_lib in '' x; do
7612 if test -z "$ac_lib"; then
7613 ac_res="none required"
7614 else
7615 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007616 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621rm -f core conftest.err conftest.$ac_objext \
7622 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007623 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626done
Victor Stinnere0be4232011-10-25 13:06:09 +02007627if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629else
7630 ac_cv_search_opendir=no
7631fi
7632rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007633LIBS=$ac_func_search_save_LIBS
7634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7636$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007638if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007640
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007641fi
7642
7643fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007644
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7646$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007647if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007649else
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007651/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007652#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007653int
7654main ()
7655{
7656return makedev(0, 0);
7657 ;
7658 return 0;
7659}
7660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007662 ac_cv_header_sys_types_h_makedev=yes
7663else
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666rm -f core conftest.err conftest.$ac_objext \
7667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007668
7669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7671$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007672
7673if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007674ac_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 +02007675if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007678
7679fi
7680
7681
7682
7683 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 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 +02007685if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007688
7689fi
7690
7691
7692 fi
7693fi
7694
Michael W. Hudson54241132001-12-07 15:38:26 +00007695
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007696# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7697for ac_header in net/if.h
7698do :
7699 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7700#ifdef STDC_HEADERS
7701# include <stdlib.h>
7702# include <stddef.h>
7703#else
7704# ifdef HAVE_STDLIB_H
7705# include <stdlib.h>
7706# endif
7707#endif
7708#ifdef HAVE_SYS_SOCKET_H
7709# include <sys/socket.h>
7710#endif
7711
7712"
Victor Stinnere0be4232011-10-25 13:06:09 +02007713if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007714 cat >>confdefs.h <<_ACEOF
7715#define HAVE_NET_IF_H 1
7716_ACEOF
7717
7718fi
7719
7720done
7721
7722
Martin v. Löwis11017b12006-01-14 18:12:57 +00007723# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007724for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007725do :
7726 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 +00007727#ifdef HAVE_ASM_TYPES_H
7728#include <asm/types.h>
7729#endif
7730#ifdef HAVE_SYS_SOCKET_H
7731#include <sys/socket.h>
7732#endif
7733
Matthias Kloseb9621712010-04-24 17:59:49 +00007734"
Victor Stinnere0be4232011-10-25 13:06:09 +02007735if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007736 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007737#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007738_ACEOF
7739
7740fi
7741
7742done
7743
7744
Charles-François Natali47413c12011-10-06 19:47:44 +02007745# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007746for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007747do :
7748 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7749ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7750#ifdef HAVE_SYS_SOCKET_H
7751#include <sys/socket.h>
7752#endif
7753
7754"
7755if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7756 cat >>confdefs.h <<_ACEOF
7757#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7758_ACEOF
7759
7760fi
7761
7762done
7763
7764
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007766was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7768$as_echo_n "checking for clock_t in time.h... " >&6; }
7769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007770/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007771#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007772
7773_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007776 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007777else
Martin v. Löwis11437992002-04-12 09:54:03 +00007778
7779
Matthias Kloseb9621712010-04-24 17:59:49 +00007780$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007782
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007784rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007785
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7787$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007788
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7790$as_echo_n "checking for makedev... " >&6; }
7791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007792/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007793
Jesus Cea740f53a2010-04-28 11:35:30 +00007794#if defined(MAJOR_IN_MKDEV)
7795#include <sys/mkdev.h>
7796#elif defined(MAJOR_IN_SYSMACROS)
7797#include <sys/sysmacros.h>
7798#else
7799#include <sys/types.h>
7800#endif
7801
Neal Norwitz11690112002-07-30 01:08:28 +00007802int
7803main ()
7804{
Jesus Cea740f53a2010-04-28 11:35:30 +00007805
7806 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007807 ;
7808 return 0;
7809}
Matthias Kloseb159a552010-04-25 21:00:44 +00007810
Neal Norwitz11690112002-07-30 01:08:28 +00007811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007812if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007813 ac_cv_has_makedev=yes
7814else
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817rm -f core conftest.err conftest.$ac_objext \
7818 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7820$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007821if test "$ac_cv_has_makedev" = "yes"; then
7822
Matthias Kloseb9621712010-04-24 17:59:49 +00007823$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007824
7825fi
7826
Christian Heimes985ecdc2013-11-20 11:46:18 +01007827# byte swapping
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7829$as_echo_n "checking for le64toh... " >&6; }
7830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831/* end confdefs.h. */
7832
7833#ifdef HAVE_ENDIAN_H
7834#include <endian.h>
7835#elif defined(HAVE_SYS_ENDIAN_H)
7836#include <sys/endian.h>
7837#endif
7838
7839int
7840main ()
7841{
7842
7843 le64toh(1)
7844 ;
7845 return 0;
7846}
7847
7848_ACEOF
7849if ac_fn_c_try_link "$LINENO"; then :
7850 ac_cv_has_le64toh=yes
7851else
7852 ac_cv_has_le64toh=no
7853fi
7854rm -f core conftest.err conftest.$ac_objext \
7855 conftest$ac_exeext conftest.$ac_ext
7856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7857$as_echo "$ac_cv_has_le64toh" >&6; }
7858if test "$ac_cv_has_le64toh" = "yes"; then
7859
7860$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7861
7862fi
7863
Martin v. Löwis399a6892002-10-04 10:22:02 +00007864# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7865# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7866# defined, but the compiler does not support pragma redefine_extname,
7867# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7868# structures (such as rlimit64) without declaring them. As a
7869# work-around, disable LFS on such configurations
7870
7871use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7873$as_echo_n "checking Solaris LFS bug... " >&6; }
7874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007875/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007876
7877#define _LARGEFILE_SOURCE 1
7878#define _FILE_OFFSET_BITS 64
7879#include <sys/resource.h>
7880
Martin v. Löwis399a6892002-10-04 10:22:02 +00007881int
7882main ()
7883{
7884struct rlimit foo;
7885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007890 sol_lfs_bug=no
7891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7896$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007897if test "$sol_lfs_bug" = "yes"; then
7898 use_lfs=no
7899fi
7900
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007901# Don't use largefile support for GNU/Hurd
7902case $ac_sys_system in GNU*)
7903 use_lfs=no
7904esac
7905
Martin v. Löwis399a6892002-10-04 10:22:02 +00007906if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007907# Two defines needed to enable largefile support on various platforms
7908# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007909case $ac_sys_system/$ac_sys_release in
7910AIX*)
7911
7912$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7913
7914 ;;
7915esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007916
Matthias Kloseb9621712010-04-24 17:59:49 +00007917$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
7919
Matthias Kloseb9621712010-04-24 17:59:49 +00007920$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007921
Martin v. Löwis399a6892002-10-04 10:22:02 +00007922fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007923
Guido van Rossum84e7b241996-08-19 21:59:00 +00007924# Add some code to confdefs.h so that the test for off_t works on SCO
7925cat >> confdefs.h <<\EOF
7926#if defined(SCO_DS)
7927#undef _OFF_T
7928#endif
7929EOF
7930
Guido van Rossumef2255b2000-03-10 22:30:29 +00007931# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007932ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007933if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007934
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007935else
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
7937cat >>confdefs.h <<_ACEOF
7938#define mode_t int
7939_ACEOF
7940
7941fi
7942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007944if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007946else
Martin v. Löwis11437992002-04-12 09:54:03 +00007947
7948cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007950_ACEOF
7951
7952fi
7953
Matthias Kloseb9621712010-04-24 17:59:49 +00007954ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007955if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007956
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007957else
Martin v. Löwis11437992002-04-12 09:54:03 +00007958
7959cat >>confdefs.h <<_ACEOF
7960#define pid_t int
7961_ACEOF
7962
7963fi
7964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007967#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007968_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007969
Matthias Kloseb9621712010-04-24 17:59:49 +00007970ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007971if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973else
Martin v. Löwis11437992002-04-12 09:54:03 +00007974
7975cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007977_ACEOF
7978
7979fi
7980
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7982$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007985else
Matthias Kloseb9621712010-04-24 17:59:49 +00007986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007987/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007988#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
7990_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993 ac_cv_type_uid_t=yes
7994else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995 ac_cv_type_uid_t=no
7996fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007997rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8001$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008002if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008005
8006
Matthias Kloseb9621712010-04-24 17:59:49 +00008007$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008008
8009fi
8010
Mark Dickinson983bc162012-12-02 12:11:38 +00008011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008013if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008016
8017fi
8018
Stefan Krah1919b7e2012-03-21 18:25:23 +01008019ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8020if test "x$ac_cv_type___uint128_t" = xyes; then :
8021
8022$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8023
8024fi
8025
Jack Jansendd19cf82001-12-06 22:36:17 +00008026
Michael W. Hudson54241132001-12-07 15:38:26 +00008027# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008028# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029# The cast to long int works around a bug in the HP C Compiler
8030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8032# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8034$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008035if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008037else
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 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 +00008039
Martin v. Löwis11437992002-04-12 09:54:03 +00008040else
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 if test "$ac_cv_type_int" = yes; then
8042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008044as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008045See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 else
8047 ac_cv_sizeof_int=0
8048 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050
Martin v. Löwis11437992002-04-12 09:54:03 +00008051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8053$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054
8055
8056
Martin v. Löwis11437992002-04-12 09:54:03 +00008057cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008058#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008059_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008060
8061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062# The cast to long int works around a bug in the HP C Compiler
8063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8065# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8067$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008068if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008070else
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 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 +00008072
Martin v. Löwis11437992002-04-12 09:54:03 +00008073else
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 if test "$ac_cv_type_long" = yes; then
8075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008077as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008078See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079 else
8080 ac_cv_sizeof_long=0
8081 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083
Martin v. Löwis11437992002-04-12 09:54:03 +00008084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8086$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087
8088
8089
Martin v. Löwis11437992002-04-12 09:54:03 +00008090cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008091#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008092_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008093
8094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095# The cast to long int works around a bug in the HP C Compiler
8096# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8097# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8098# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8100$as_echo_n "checking size of long long... " >&6; }
8101if ${ac_cv_sizeof_long_long+:} false; then :
8102 $as_echo_n "(cached) " >&6
8103else
8104 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8105
8106else
8107 if test "$ac_cv_type_long_long" = yes; then
8108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8110as_fn_error 77 "cannot compute sizeof (long long)
8111See \`config.log' for more details" "$LINENO" 5; }
8112 else
8113 ac_cv_sizeof_long_long=0
8114 fi
8115fi
8116
8117fi
8118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8119$as_echo "$ac_cv_sizeof_long_long" >&6; }
8120
8121
8122
8123cat >>confdefs.h <<_ACEOF
8124#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8125_ACEOF
8126
8127
8128# The cast to long int works around a bug in the HP C Compiler
8129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8131# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8133$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008134if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 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 +00008138
Martin v. Löwis11437992002-04-12 09:54:03 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 if test "$ac_cv_type_void_p" = yes; then
8141 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008143as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008144See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 else
8146 ac_cv_sizeof_void_p=0
8147 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008149
Martin v. Löwis11437992002-04-12 09:54:03 +00008150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8152$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153
8154
8155
Martin v. Löwis11437992002-04-12 09:54:03 +00008156cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008157#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008158_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008159
8160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161# The cast to long int works around a bug in the HP C Compiler
8162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8164# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8166$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008167if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 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 +00008171
Martin v. Löwis11437992002-04-12 09:54:03 +00008172else
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 if test "$ac_cv_type_short" = yes; then
8174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008176as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008177See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178 else
8179 ac_cv_sizeof_short=0
8180 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8185$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186
8187
8188
Martin v. Löwis11437992002-04-12 09:54:03 +00008189cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008190#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008191_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008192
8193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194# The cast to long int works around a bug in the HP C Compiler
8195# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8196# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8197# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8199$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008200if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008202else
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 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 +00008204
Martin v. Löwis11437992002-04-12 09:54:03 +00008205else
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 if test "$ac_cv_type_float" = yes; then
8207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008209as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008210See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 else
8212 ac_cv_sizeof_float=0
8213 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215
Martin v. Löwis11437992002-04-12 09:54:03 +00008216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8218$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219
8220
8221
Martin v. Löwis11437992002-04-12 09:54:03 +00008222cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008223#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008224_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008225
8226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227# The cast to long int works around a bug in the HP C Compiler
8228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8230# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8232$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008233if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 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 +00008237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 if test "$ac_cv_type_double" = yes; then
8240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008242as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008243See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 else
8245 ac_cv_sizeof_double=0
8246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8251$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252
8253
8254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008256#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008257_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008258
8259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260# The cast to long int works around a bug in the HP C Compiler
8261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8263# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8265$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008266if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008268else
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 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 +00008270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271else
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 if test "$ac_cv_type_fpos_t" = yes; then
8273 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008275as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008276See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 else
8278 ac_cv_sizeof_fpos_t=0
8279 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8284$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285
8286
8287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008289#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008290_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008291
Michael W. Hudson54241132001-12-07 15:38:26 +00008292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# The cast to long int works around a bug in the HP C Compiler
8294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8296# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8298$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008299if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 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 +00008303
Martin v. Löwis18e16552006-02-15 17:27:45 +00008304else
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 if test "$ac_cv_type_size_t" = yes; then
8306 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008308as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008309See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310 else
8311 ac_cv_sizeof_size_t=0
8312 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314
Martin v. Löwis18e16552006-02-15 17:27:45 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8317$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318
8319
8320
Martin v. Löwis18e16552006-02-15 17:27:45 +00008321cat >>confdefs.h <<_ACEOF
8322#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8323_ACEOF
8324
8325
Christian Heimes400adb02008-02-01 08:12:03 +00008326# The cast to long int works around a bug in the HP C Compiler
8327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8329# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8331$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008332if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008334else
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 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 +00008336
Christian Heimes400adb02008-02-01 08:12:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 if test "$ac_cv_type_pid_t" = yes; then
8339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008341as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008342See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008343 else
8344 ac_cv_sizeof_pid_t=0
8345 fi
8346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008347
Christian Heimes400adb02008-02-01 08:12:03 +00008348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8350$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008351
8352
8353
8354cat >>confdefs.h <<_ACEOF
8355#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8356_ACEOF
8357
8358
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008359# The cast to long int works around a bug in the HP C Compiler
8360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8362# This bug is HP SR number 8606223364.
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8364$as_echo_n "checking size of uintptr_t... " >&6; }
8365if ${ac_cv_sizeof_uintptr_t+:} false; then :
8366 $as_echo_n "(cached) " >&6
8367else
8368 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8369
8370else
8371 if test "$ac_cv_type_uintptr_t" = yes; then
8372 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8374as_fn_error 77 "cannot compute sizeof (uintptr_t)
8375See \`config.log' for more details" "$LINENO" 5; }
8376 else
8377 ac_cv_sizeof_uintptr_t=0
8378 fi
8379fi
8380
8381fi
8382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8383$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8384
8385
8386
8387cat >>confdefs.h <<_ACEOF
8388#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8389_ACEOF
8390
8391
Michael W. Hudson54241132001-12-07 15:38:26 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8394$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008395have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008397/* end confdefs.h. */
8398
8399int
8400main ()
8401{
8402long double x; x = (long double)0;
8403 ;
8404 return 0;
8405}
8406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008407if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008408
8409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008411
8412 have_long_double=yes
8413
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008414fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8417$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008418if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008419# The cast to long int works around a bug in the HP C Compiler
8420# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8421# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8422# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8424$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008425if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008427else
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 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 +00008429
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008430else
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 if test "$ac_cv_type_long_double" = yes; then
8432 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008434as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008435See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008436 else
8437 ac_cv_sizeof_long_double=0
8438 fi
8439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8443$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008444
8445
8446
8447cat >>confdefs.h <<_ACEOF
8448#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8449_ACEOF
8450
8451
8452fi
8453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454# The cast to long int works around a bug in the HP C Compiler
8455# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8456# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8457# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8459$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008460if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008462else
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 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 +00008464
Thomas Woutersb2137042007-02-01 18:02:27 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 if test "$ac_cv_type__Bool" = yes; then
8467 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008469as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008470See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471 else
8472 ac_cv_sizeof__Bool=0
8473 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008475
Thomas Woutersb2137042007-02-01 18:02:27 +00008476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8478$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479
8480
8481
Thomas Woutersb2137042007-02-01 18:02:27 +00008482cat >>confdefs.h <<_ACEOF
8483#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8484_ACEOF
8485
8486
Thomas Woutersb2137042007-02-01 18:02:27 +00008487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8493$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008498#ifdef HAVE_SYS_TYPES_H
8499#include <sys/types.h>
8500#endif
8501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008504else
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 if test "$ac_cv_type_off_t" = yes; then
8506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008508as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008509See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008510 else
8511 ac_cv_sizeof_off_t=0
8512 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8517$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008519
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008522#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008523_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008524
Michael W. Hudson54241132001-12-07 15:38:26 +00008525
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008526
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8528$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008529if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008530 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008531
Matthias Kloseb9621712010-04-24 17:59:49 +00008532$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8535$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8538$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008539fi
8540
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008541# The cast to long int works around a bug in the HP C Compiler
8542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8544# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8546$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008547if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008549else
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008551#ifdef HAVE_SYS_TYPES_H
8552#include <sys/types.h>
8553#endif
8554#ifdef HAVE_TIME_H
8555#include <time.h>
8556#endif
8557
Matthias Kloseb9621712010-04-24 17:59:49 +00008558"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 if test "$ac_cv_type_time_t" = yes; then
8562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008564as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008565See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008566 else
8567 ac_cv_sizeof_time_t=0
8568 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8573$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008574
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008575
8576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008578#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008579_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008580
Michael W. Hudson54241132001-12-07 15:38:26 +00008581
8582
Trent Mick635f6fb2000-08-23 21:33:05 +00008583# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008584ac_save_cc="$CC"
8585if test "$ac_cv_kpthread" = "yes"
8586then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008587elif test "$ac_cv_kthread" = "yes"
8588then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008589elif test "$ac_cv_pthread" = "yes"
8590then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008591fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8594$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008595have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008597/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008598
8599 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008600int
8601main ()
8602{
Guido van Rossum12580492000-09-24 16:47:19 +00008603pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ;
8605 return 0;
8606}
Matthias Kloseb159a552010-04-25 21:00:44 +00008607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008609if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008610 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8614$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008615if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008617# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8618# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8619# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8621$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008622if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008624else
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008626#ifdef HAVE_PTHREAD_H
8627#include <pthread.h>
8628#endif
8629
Matthias Kloseb9621712010-04-24 17:59:49 +00008630"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008631
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 if test "$ac_cv_type_pthread_t" = yes; then
8634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008636as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008637See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008638 else
8639 ac_cv_sizeof_pthread_t=0
8640 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642
Trent Mick635f6fb2000-08-23 21:33:05 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8645$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008646
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008647
8648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008650#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008651_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008652
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008653
Trent Mick635f6fb2000-08-23 21:33:05 +00008654fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008655CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008656
Michael W. Hudson54241132001-12-07 15:38:26 +00008657
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008658case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008659 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008660 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8661 ;;
8662 Darwin/*)
8663 OTHER_LIBTOOL_OPT=""
8664 ;;
8665esac
8666
8667
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008668
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008669case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008670 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008671 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8672 if test "${enable_universalsdk}"; then
8673 :
8674 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008675 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008676 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008677 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008678 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008679 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008680 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008681 if test ${gcc_version} '<' 4.0
8682 then
8683 LIBTOOL_CRUFT="-lcc_dynamic"
8684 else
8685 LIBTOOL_CRUFT=""
8686 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008688 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008691/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008692
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008693 #include <unistd.h>
8694 int main(int argc, char*argv[])
8695 {
8696 if (sizeof(long) == 4) {
8697 return 0;
8698 } else {
8699 return 1;
8700 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008701 }
8702
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008704if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008705 ac_osx_32bit=yes
8706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008711fi
8712
8713
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008714 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008715 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008716 i386)
8717 MACOSX_DEFAULT_ARCH="i386"
8718 ;;
8719 ppc)
8720 MACOSX_DEFAULT_ARCH="ppc"
8721 ;;
8722 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008723 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008724 ;;
8725 esac
8726 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008727 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008728 i386)
8729 MACOSX_DEFAULT_ARCH="x86_64"
8730 ;;
8731 ppc)
8732 MACOSX_DEFAULT_ARCH="ppc64"
8733 ;;
8734 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008735 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008736 ;;
8737 esac
8738
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008739 fi
8740
8741 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008742 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008743 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008744esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8746$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008747if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008748then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008749 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008751 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8756$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008757 if test $enable_shared = "yes"
8758 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008759 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 +00008760 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008764fi
8765
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8767$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008768case $ac_sys_system/$ac_sys_release in
8769 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8774$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008775 ;;
8776 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8778$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008779 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008780esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008781
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008783
Michael W. Hudson54241132001-12-07 15:38:26 +00008784
8785
8786
8787
Benjamin Peterson99f03762010-04-11 22:15:28 +00008788
Thomas Wouters477c8d52006-05-27 19:21:47 +00008789
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008790# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8791# -- usually .so, .sl on HP-UX, .dll on Cygwin
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8793$as_echo_n "checking the extension of shared libraries... " >&6; }
8794if test -z "$SHLIB_SUFFIX"; then
8795 case $ac_sys_system in
8796 hp*|HP*)
8797 case `uname -m` in
8798 ia64) SHLIB_SUFFIX=.so;;
8799 *) SHLIB_SUFFIX=.sl;;
8800 esac
8801 ;;
8802 CYGWIN*) SHLIB_SUFFIX=.dll;;
8803 *) SHLIB_SUFFIX=.so;;
8804 esac
8805fi
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8807$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008808
Guido van Rossum0a516c91994-09-12 10:58:40 +00008809# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008810# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008811# (Shared libraries in this instance are shared modules to be loaded into
8812# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8814$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008815if test -z "$LDSHARED"
8816then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008817 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008818 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008819 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008820 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008821 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008822 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008823 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008825 if test "$GCC" = "yes" ; then
8826 LDSHARED='$(CC) -shared'
8827 LDCXXSHARED='$(CXX) -shared'
8828 else
8829 LDSHARED='$(CC) -G'
8830 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008831 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008832 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008833 if test "$GCC" = "yes" ; then
8834 LDSHARED='$(CC) -shared'
8835 LDCXXSHARED='$(CXX) -shared'
8836 else
8837 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008838 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008839 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008840 LDSHARED='$(CC) -bundle'
8841 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008842 if test "$enable_framework" ; then
8843 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008844 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8845 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008846 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008847 else
8848 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008849 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008850 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008851 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008852 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008853 LDSHARED='$(CC) -bundle'
8854 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008855 if test "$enable_framework" ; then
8856 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008857 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8858 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008859 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008860 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008861 # No framework, use the Python app as bundle-loader
8862 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008863 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008864 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008865 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008866 Darwin/*)
8867 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8868 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008869
Ned Deily36820b62014-06-25 13:44:22 -07008870 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8871 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8872 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8873 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8874 if test ${dep_target_major} -eq 10 && \
8875 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008876 then
Ned Deily36820b62014-06-25 13:44:22 -07008877 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008878 LDSHARED='$(CC) -bundle'
8879 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008880 if test "$enable_framework" ; then
8881 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008882 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8883 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008884 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008885 else
8886 # No framework, use the Python app as bundle-loader
8887 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8888 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008889 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008890 fi
Ned Deily36820b62014-06-25 13:44:22 -07008891 else
8892 # building for OS X 10.3 and later
8893 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8894 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8895 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008896 fi
8897 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008898 Linux*|GNU*|QNX*)
8899 LDSHARED='$(CC) -shared'
8900 LDCXXSHARED='$(CXX) -shared';;
8901 BSD/OS*/4*)
8902 LDSHARED="gcc -shared"
8903 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008904 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008905 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008906 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008907 LDSHARED='$(CC) -shared'
8908 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008909 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008910 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008911 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008912 OpenBSD*)
8913 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8914 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008915 LDSHARED='$(CC) -shared $(CCSHARED)'
8916 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008917 else
8918 case `uname -r` in
8919 [01].* | 2.[0-7] | 2.[0-7].*)
8920 LDSHARED="ld -Bshareable ${LDFLAGS}"
8921 ;;
8922 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008923 LDSHARED='$(CC) -shared $(CCSHARED)'
8924 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008925 ;;
8926 esac
8927 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008928 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008929 LDSHARED='$(CC) -shared'
8930 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008931 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008932 if test "$GCC" = "yes" ; then
8933 LDSHARED='$(CC) -shared'
8934 LDCXXSHARED='$(CXX) -shared'
8935 else
8936 LDSHARED='$(CC) -G'
8937 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008938 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008939 SCO_SV*)
8940 LDSHARED='$(CC) -Wl,-G,-Bexport'
8941 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8942 CYGWIN*)
8943 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8944 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008945 *) LDSHARED="ld";;
8946 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8949$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008950LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008951BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008952# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008953# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8955$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008956if test -z "$CCSHARED"
8957then
Guido van Rossum07397971997-04-29 21:49:50 +00008958 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008959 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008960 then CCSHARED="-fPIC";
8961 elif test `uname -p` = sparc;
8962 then CCSHARED="-xcode=pic32";
8963 else CCSHARED="-Kpic";
8964 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008965 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008966 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008967 else CCSHARED="+z";
8968 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008969 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008970 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008971 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008972 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008973 if test "$GCC" = "yes"
8974 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008975 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008976 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008977 SCO_SV*)
8978 if test "$GCC" = "yes"
8979 then CCSHARED="-fPIC"
8980 else CCSHARED="-Kpic -belf"
8981 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008982 IRIX*/6*) case $CC in
8983 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008984 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008985 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008986 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8989$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008990# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008991# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8993$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008994if test -z "$LINKFORSHARED"
8995then
Guido van Rossum07397971997-04-29 21:49:50 +00008996 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008997 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008998 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008999 LINKFORSHARED="-Wl,-E -Wl,+s";;
9000# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009001 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009002 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009003 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009005 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009006
9007 # Issue #18075: the default maximum stack size (8MBytes) is too
9008 # small for the default recursion limit. Increase the stack size
9009 # to ensure that tests don't crash
9010 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9011
Jack Jansene578a632001-08-15 01:27:14 +00009012 if test "$enable_framework"
9013 then
Jack Jansenda49e192005-01-07 13:08:22 +00009014 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009015 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009016 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009017 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009018 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009019 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009020 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009021 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9022 then
9023 LINKFORSHARED="-Wl,--export-dynamic"
9024 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009025 SunOS/5*) case $CC in
9026 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009027 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009028 then
9029 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009030 fi;;
9031 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009032 CYGWIN*)
9033 if test $enable_shared = "no"
9034 then
9035 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9036 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009037 QNX*)
9038 # -Wl,-E causes the symbols to be added to the dynamic
9039 # symbol table so that they can be found when a module
9040 # is loaded. -N 2048K causes the stack size to be set
9041 # to 2048 kilobytes so that the stack doesn't overflow
9042 # when running test_compile.py.
9043 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009044 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9047$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009048
Michael W. Hudson54241132001-12-07 15:38:26 +00009049
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9052$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009053if test ! "$LIBRARY" = "$LDLIBRARY"
9054then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009055 case $ac_sys_system in
9056 CYGWIN*)
9057 # Cygwin needs CCSHARED when building extension DLLs
9058 # but not when building the interpreter DLL.
9059 CFLAGSFORSHARED='';;
9060 *)
9061 CFLAGSFORSHARED='$(CCSHARED)'
9062 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9065$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009066
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009067# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9068# library (with --enable-shared).
9069# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009070# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9071# if it is not required, since it creates a dependency of the shared library
9072# to LIBS. This, in turn, means that applications linking the shared libpython
9073# don't need to link LIBS explicitly. The default should be only changed
9074# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9077$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009078case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009079 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009080 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009081esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9083$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009084
9085
Guido van Rossum627b2d71993-12-24 10:39:16 +00009086# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9088$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009089if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009090 $as_echo_n "(cached) " >&6
9091else
9092 ac_check_lib_save_LIBS=$LIBS
9093LIBS="-lsendfile $LIBS"
9094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9095/* end confdefs.h. */
9096
9097/* Override any GCC internal prototype to avoid an error.
9098 Use char because int might match the return type of a GCC
9099 builtin and then its argument prototype would still apply. */
9100#ifdef __cplusplus
9101extern "C"
9102#endif
9103char sendfile ();
9104int
9105main ()
9106{
9107return sendfile ();
9108 ;
9109 return 0;
9110}
9111_ACEOF
9112if ac_fn_c_try_link "$LINENO"; then :
9113 ac_cv_lib_sendfile_sendfile=yes
9114else
9115 ac_cv_lib_sendfile_sendfile=no
9116fi
9117rm -f core conftest.err conftest.$ac_objext \
9118 conftest$ac_exeext conftest.$ac_ext
9119LIBS=$ac_check_lib_save_LIBS
9120fi
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9122$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009123if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009124 cat >>confdefs.h <<_ACEOF
9125#define HAVE_LIBSENDFILE 1
9126_ACEOF
9127
9128 LIBS="-lsendfile $LIBS"
9129
9130fi
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9133$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009134if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009136else
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009138LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142/* Override any GCC internal prototype to avoid an error.
9143 Use char because int might match the return type of a GCC
9144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009145#ifdef __cplusplus
9146extern "C"
9147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009148char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009149int
9150main ()
9151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ;
9154 return 0;
9155}
9156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009159else
Matthias Kloseb9621712010-04-24 17:59:49 +00009160 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009162rm -f core conftest.err conftest.$ac_objext \
9163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009164LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9167$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009168if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 cat >>confdefs.h <<_ACEOF
9170#define HAVE_LIBDL 1
9171_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009172
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009173 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009175fi
9176 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9178$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009179if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009180 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009181else
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009183LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187/* Override any GCC internal prototype to avoid an error.
9188 Use char because int might match the return type of a GCC
9189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190#ifdef __cplusplus
9191extern "C"
9192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009193char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009194int
9195main ()
9196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ;
9199 return 0;
9200}
9201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009204else
Matthias Kloseb9621712010-04-24 17:59:49 +00009205 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009207rm -f core conftest.err conftest.$ac_objext \
9208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9212$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009213if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 cat >>confdefs.h <<_ACEOF
9215#define HAVE_LIBDLD 1
9216_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009217
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009218 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009220fi
9221 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009222
Georg Brandlb1441c72009-01-03 22:33:39 +00009223# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009224if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9226$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009227if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009229else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009230 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234/* Override any GCC internal prototype to avoid an error.
9235 Use char because int might match the return type of a GCC
9236 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009237#ifdef __cplusplus
9238extern "C"
9239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009240char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009241int
9242main ()
9243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 ;
9246 return 0;
9247}
9248_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009249for ac_lib in '' pthread rt posix4; do
9250 if test -z "$ac_lib"; then
9251 ac_res="none required"
9252 else
9253 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009254 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009255 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009259rm -f core conftest.err conftest.$ac_objext \
9260 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009261 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264done
Victor Stinnere0be4232011-10-25 13:06:09 +02009265if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267else
9268 ac_cv_search_sem_init=no
9269fi
9270rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009271LIBS=$ac_func_search_save_LIBS
9272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9274$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009276if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009278
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009279fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009280 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009281 # posix4 on Solaris 2.6
9282 # pthread (first!) on Linux
9283fi
9284
Martin v. Löwis19d17342003-06-14 21:03:05 +00009285# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9287$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009288if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009290else
9291 ac_check_lib_save_LIBS=$LIBS
9292LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009294/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296/* Override any GCC internal prototype to avoid an error.
9297 Use char because int might match the return type of a GCC
9298 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009299#ifdef __cplusplus
9300extern "C"
9301#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009302char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009303int
9304main ()
9305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009307 ;
9308 return 0;
9309}
9310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009312 ac_cv_lib_intl_textdomain=yes
9313else
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009316rm -f core conftest.err conftest.$ac_objext \
9317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009318LIBS=$ac_check_lib_save_LIBS
9319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9321$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009322if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009325
Brett Cannonc6d936e2009-06-07 20:09:53 +00009326 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009327fi
9328
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009329
9330# checks for system dependent C++ extensions support
9331case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009332 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9333$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009336
Georg Brandl59e87bd2011-02-15 19:48:59 +00009337 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009338int
9339main ()
9340{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009341loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 ;
9343 return 0;
9344}
Matthias Kloseb159a552010-04-25 21:00:44 +00009345
Martin v. Löwis11437992002-04-12 09:54:03 +00009346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009347if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009348
Matthias Kloseb159a552010-04-25 21:00:44 +00009349
Matthias Kloseb9621712010-04-24 17:59:49 +00009350$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
Matthias Kloseb159a552010-04-25 21:00:44 +00009352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009353$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009354
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009355else
Matthias Kloseb159a552010-04-25 21:00:44 +00009356
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009359
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361rm -f core conftest.err conftest.$ac_objext \
9362 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009363 *) ;;
9364esac
9365
Christian Heimes985ecdc2013-11-20 11:46:18 +01009366# check for systems that require aligned memory access
9367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9368$as_echo_n "checking aligned memory access is required... " >&6; }
9369if test "$cross_compiling" = yes; then :
9370 aligned_required=yes
9371else
9372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9373/* end confdefs.h. */
9374
9375int main()
9376{
9377 char s[16];
9378 int i, *p1, *p2;
9379 for (i=0; i < 16; i++)
9380 s[i] = i;
9381 p1 = (int*)(s+1);
9382 p2 = (int*)(s+2);
9383 if (*p1 == *p2)
9384 return 1;
9385 return 0;
9386}
9387
9388_ACEOF
9389if ac_fn_c_try_run "$LINENO"; then :
9390 aligned_required=no
9391else
9392 aligned_required=yes
9393fi
9394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9395 conftest.$ac_objext conftest.beam conftest.$ac_ext
9396fi
9397
9398
9399if test "$aligned_required" = yes ; then
9400
9401$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9402
9403fi
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9405$as_echo "$aligned_required" >&6; }
9406
9407
9408# str, bytes and memoryview hash algorithm
9409
9410
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9412$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9413
9414# Check whether --with-hash_algorithm was given.
9415if test "${with_hash_algorithm+set}" = set; then :
9416 withval=$with_hash_algorithm;
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9418$as_echo "$withval" >&6; }
9419case "$withval" in
9420 siphash24)
9421 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9422
9423 ;;
9424 fnv)
9425 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9426
9427 ;;
9428 *)
9429 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9430 ;;
9431esac
9432
9433else
9434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9435$as_echo "default" >&6; }
9436fi
9437
9438
Charles-François Natalid30b0222014-05-08 23:08:51 +01009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9440$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9441
9442# Check whether --with-address_sanitizer was given.
9443if test "${with_address_sanitizer+set}" = set; then :
9444 withval=$with_address_sanitizer;
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9446$as_echo "$withval" >&6; }
9447BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9448LDFLAGS="-fsanitize=address $LDFLAGS"
9449
9450else
9451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
9453fi
9454
9455
Guido van Rossum70c7f481998-03-26 18:44:10 +00009456# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9458$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009459if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009461else
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009463LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467/* Override any GCC internal prototype to avoid an error.
9468 Use char because int might match the return type of a GCC
9469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470#ifdef __cplusplus
9471extern "C"
9472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009473char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
9476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009484else
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009487rm -f core conftest.err conftest.$ac_objext \
9488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009489LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9492$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009493if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009494 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009495fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009496 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9498$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009501else
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009503LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510#ifdef __cplusplus
9511extern "C"
9512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009513char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514int
9515main ()
9516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009524else
Matthias Kloseb9621712010-04-24 17:59:49 +00009525 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527rm -f core conftest.err conftest.$ac_objext \
9528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009529LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9532$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009533if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009534 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009535fi
9536 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009537
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9539$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009542if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9545$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009546LIBS="$withval $LIBS"
9547
9548else
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551fi
9552
Guido van Rossum7f43da71994-08-01 12:15:30 +00009553
Victor Stinner8291b5e2015-03-20 16:03:14 +01009554
9555
9556
9557
9558
9559
9560
9561if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9562 if test -n "$ac_tool_prefix"; then
9563 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9564set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566$as_echo_n "checking for $ac_word... " >&6; }
9567if ${ac_cv_path_PKG_CONFIG+:} false; then :
9568 $as_echo_n "(cached) " >&6
9569else
9570 case $PKG_CONFIG in
9571 [\\/]* | ?:[\\/]*)
9572 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9573 ;;
9574 *)
9575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9576for as_dir in $PATH
9577do
9578 IFS=$as_save_IFS
9579 test -z "$as_dir" && as_dir=.
9580 for ac_exec_ext in '' $ac_executable_extensions; do
9581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9582 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9584 break 2
9585 fi
9586done
9587 done
9588IFS=$as_save_IFS
9589
9590 ;;
9591esac
9592fi
9593PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9594if test -n "$PKG_CONFIG"; then
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9596$as_echo "$PKG_CONFIG" >&6; }
9597else
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599$as_echo "no" >&6; }
9600fi
9601
9602
9603fi
9604if test -z "$ac_cv_path_PKG_CONFIG"; then
9605 ac_pt_PKG_CONFIG=$PKG_CONFIG
9606 # Extract the first word of "pkg-config", so it can be a program name with args.
9607set dummy pkg-config; ac_word=$2
9608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9609$as_echo_n "checking for $ac_word... " >&6; }
9610if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9611 $as_echo_n "(cached) " >&6
9612else
9613 case $ac_pt_PKG_CONFIG in
9614 [\\/]* | ?:[\\/]*)
9615 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9616 ;;
9617 *)
9618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619for as_dir in $PATH
9620do
9621 IFS=$as_save_IFS
9622 test -z "$as_dir" && as_dir=.
9623 for ac_exec_ext in '' $ac_executable_extensions; do
9624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9625 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9627 break 2
9628 fi
9629done
9630 done
9631IFS=$as_save_IFS
9632
9633 ;;
9634esac
9635fi
9636ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9637if test -n "$ac_pt_PKG_CONFIG"; then
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9639$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9640else
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9642$as_echo "no" >&6; }
9643fi
9644
9645 if test "x$ac_pt_PKG_CONFIG" = x; then
9646 PKG_CONFIG=""
9647 else
9648 case $cross_compiling:$ac_tool_warned in
9649yes:)
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9652ac_tool_warned=yes ;;
9653esac
9654 PKG_CONFIG=$ac_pt_PKG_CONFIG
9655 fi
9656else
9657 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9658fi
9659
9660fi
9661if test -n "$PKG_CONFIG"; then
9662 _pkg_min_version=0.9.0
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9664$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9665 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9667$as_echo "yes" >&6; }
9668 else
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
9671 PKG_CONFIG=""
9672 fi
9673fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009674
9675# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9677$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009678
9679# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009681 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009682else
9683 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009684fi
9685
9686
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9688$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009689
9690# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9692$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009693
9694# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009695if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009696 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009697else
9698 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009699fi
9700
9701
9702if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009703 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9704else
9705 LIBFFI_INCLUDEDIR=""
9706fi
9707
9708
Matthias Kloseb9621712010-04-24 17:59:49 +00009709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9710$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009711
Stefan Krah60187b52012-03-23 19:06:27 +01009712# Check for use of the system libmpdec library
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9714$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9715
9716# Check whether --with-system_libmpdec was given.
9717if test "${with_system_libmpdec+set}" = set; then :
9718 withval=$with_system_libmpdec;
9719else
9720 with_system_libmpdec="no"
9721fi
9722
9723
9724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9725$as_echo "$with_system_libmpdec" >&6; }
9726
Benjamin Peterson076ed002010-10-31 17:11:02 +00009727# Check for support for loadable sqlite extensions
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9729$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9730# Check whether --enable-loadable-sqlite-extensions was given.
9731if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9732 enableval=$enable_loadable_sqlite_extensions;
9733else
9734 enable_loadable_sqlite_extensions="no"
9735fi
9736
9737
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9739$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9740
Ned Deilyd819b932013-09-06 01:07:05 -07009741# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9742
9743
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9745$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9746
9747# Check whether --with-tcltk-includes was given.
9748if test "${with_tcltk_includes+set}" = set; then :
9749 withval=$with_tcltk_includes;
9750else
9751 with_tcltk_includes="default"
9752fi
9753
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9755$as_echo "$with_tcltk_includes" >&6; }
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9757$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9758
9759# Check whether --with-tcltk-libs was given.
9760if test "${with_tcltk_libs+set}" = set; then :
9761 withval=$with_tcltk_libs;
9762else
9763 with_tcltk_libs="default"
9764fi
9765
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9767$as_echo "$with_tcltk_libs" >&6; }
9768if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9769then
9770 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9771 then
9772 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9773 fi
9774 TCLTK_INCLUDES=""
9775 TCLTK_LIBS=""
9776else
9777 TCLTK_INCLUDES="$with_tcltk_includes"
9778 TCLTK_LIBS="$with_tcltk_libs"
9779fi
9780
Matthias Klose55708cc2009-04-30 08:06:49 +00009781# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9783$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009784
9785# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009786if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009787 withval=$with_dbmliborder;
9788if test x$with_dbmliborder = xyes
9789then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009790as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009791else
9792 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9793 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9794 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009795 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009796 fi
9797 done
9798fi
9799fi
9800
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9802$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009803
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009804# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009805
9806
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9808$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009811if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 withval=$with_signal_module;
9813fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009814
9815
9816if test -z "$with_signal_module"
9817then with_signal_module="yes"
9818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9820$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009821
9822if test "${with_signal_module}" = "yes"; then
9823 USE_SIGNAL_MODULE=""
9824 SIGNAL_OBJS=""
9825else
9826 USE_SIGNAL_MODULE="#"
9827 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9828fi
9829
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009830# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009831
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009832USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834
Martin v. Löwis11437992002-04-12 09:54:03 +00009835
9836# Templates for things AC_DEFINEd more than once.
9837# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009838
9839
Martin v. Löwis11437992002-04-12 09:54:03 +00009840
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9842$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 withval=$with_threads;
9847fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009848
9849
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009850# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 withval=$with_thread; with_threads=$with_thread
9855fi
9856
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009857
9858if test -z "$with_threads"
9859then with_threads="yes"
9860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9862$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009863
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009864
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009865if test "$with_threads" = "no"
9866then
9867 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009868elif test "$ac_cv_pthread_is_default" = yes
9869then
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009871
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009872 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009874
9875 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009877elif test "$ac_cv_kpthread" = "yes"
9878then
9879 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009880 if test "$ac_cv_cxx_thread" = "yes"; then
9881 CXX="$CXX -Kpthread"
9882 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009884
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009885 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009886 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009887elif test "$ac_cv_kthread" = "yes"
9888then
9889 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009890 if test "$ac_cv_cxx_thread" = "yes"; then
9891 CXX="$CXX -Kthread"
9892 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009894
9895 posix_threads=yes
9896 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009897elif test "$ac_cv_pthread" = "yes"
9898then
9899 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009900 if test "$ac_cv_cxx_thread" = "yes"; then
9901 CXX="$CXX -pthread"
9902 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009904
9905 posix_threads=yes
9906 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009907else
9908 if test ! -z "$with_threads" -a -d "$with_threads"
9909 then LDFLAGS="$LDFLAGS -L$with_threads"
9910 fi
9911 if test ! -z "$withval" -a -d "$withval"
9912 then LDFLAGS="$LDFLAGS -L$withval"
9913 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009914
9915 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009916 # define _POSIX_THREADS in unistd.h. Some apparently don't
9917 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9919$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009922
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009923#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009924#ifdef _POSIX_THREADS
9925yes
9926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009927
9928_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009931 unistd_defines_pthreads=yes
9932else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009933 unistd_defines_pthreads=no
9934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009935rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009936
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9938$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009939
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009941
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009942 # Just looking for pthread_create in libpthread is not enough:
9943 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9944 # So we really have to include pthread.h, and then link.
9945 _libs=$LIBS
9946 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9948$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009950/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009951
9952#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009953#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009954
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009955void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009956int
9957main ()
9958{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009959
9960pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 ;
9962 return 0;
9963}
9964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009965if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009966
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9968$as_echo "yes" >&6; }
9969 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009970
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009971 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009972 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009973else
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009975 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009977if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009979
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009980 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009981 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009982else
Guido van Rossumad678af1998-10-02 14:42:15 +00009983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9985$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009986if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009987 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009988else
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009990LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994/* Override any GCC internal prototype to avoid an error.
9995 Use char because int might match the return type of a GCC
9996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009997#ifdef __cplusplus
9998extern "C"
9999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010000char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010001int
10002main ()
10003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 ;
10006 return 0;
10007}
10008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014rm -f core conftest.err conftest.$ac_objext \
10015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010016LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10019$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010020if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010022
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010023 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010024 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010025 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010026else
Greg Steinadf63d62000-07-05 10:38:09 +000010027
Matthias Kloseb9621712010-04-24 17:59:49 +000010028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10029$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010030if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010032else
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010034LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038/* Override any GCC internal prototype to avoid an error.
10039 Use char because int might match the return type of a GCC
10040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010041#ifdef __cplusplus
10042extern "C"
10043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010044char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ;
10050 return 0;
10051}
10052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010055else
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010060LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10063$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010064if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010067 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010068 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010069 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010070else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010071
Matthias Kloseb9621712010-04-24 17:59:49 +000010072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10073$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010074if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010076else
Martin v. Löwis11437992002-04-12 09:54:03 +000010077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010078LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010082/* Override any GCC internal prototype to avoid an error.
10083 Use char because int might match the return type of a GCC
10084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010085#ifdef __cplusplus
10086extern "C"
10087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010088char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010089int
10090main ()
10091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010093 ;
10094 return 0;
10095}
10096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010102rm -f core conftest.err conftest.$ac_objext \
10103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010104LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10107$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010108if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010111 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010112 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010113 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010114else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010115
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10117$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010118if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010119 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010120else
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010122LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126/* Override any GCC internal prototype to avoid an error.
10127 Use char because int might match the return type of a GCC
10128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010129#ifdef __cplusplus
10130extern "C"
10131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010132char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010133int
10134main ()
10135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ;
10138 return 0;
10139}
10140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010143else
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010146rm -f core conftest.err conftest.$ac_objext \
10147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010148LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10151$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010152if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010154
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010155 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010156 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010157 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010158else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010159
Martin v. Löwis130fb172001-07-19 11:00:41 +000010160 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010161fi
10162
Guido van Rossum627b2d71993-12-24 10:39:16 +000010163
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010164fi
10165
Guido van Rossum0be3e491997-05-22 20:33:33 +000010166fi
10167
Guido van Rossum49545951997-12-02 19:28:29 +000010168fi
10169
Guido van Rossumb93a8621998-05-07 13:27:32 +000010170fi
10171
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173rm -f core conftest.err conftest.$ac_objext \
10174 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010175
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10177$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010178if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010180else
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010182LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186/* Override any GCC internal prototype to avoid an error.
10187 Use char because int might match the return type of a GCC
10188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010189#ifdef __cplusplus
10190extern "C"
10191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010192char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010193int
10194main ()
10195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 ;
10198 return 0;
10199}
10200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010203else
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206rm -f core conftest.err conftest.$ac_objext \
10207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10211$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010212if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010214
Martin v. Löwis130fb172001-07-19 11:00:41 +000010215 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010216 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010217 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010218fi
10219
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010220
Neal Norwitza978ab02002-11-02 16:58:05 +000010221 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10223$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010224if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010226else
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010228LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232/* Override any GCC internal prototype to avoid an error.
10233 Use char because int might match the return type of a GCC
10234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010235#ifdef __cplusplus
10236extern "C"
10237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010238char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010239int
10240main ()
10241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ;
10244 return 0;
10245}
10246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010249else
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010252rm -f core conftest.err conftest.$ac_objext \
10253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010254LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10257$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010258if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010260
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010261 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010262 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010263 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010264fi
10265
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010266 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010267fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010268
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010269if test "$posix_threads" = "yes"; then
10270 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010271
Matthias Kloseb9621712010-04-24 17:59:49 +000010272$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010273
10274 fi
10275
10276 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10277 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010278 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010279$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010280
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010281 ;;
10282 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010283$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010284
10285 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010286 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010287$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010288
10289 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010290 esac
10291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10293$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010294 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010298 ac_cv_pthread_system_supported=no
10299else
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010302
10303 #include <stdio.h>
10304 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010305 void *foo(void *parm) {
10306 return NULL;
10307 }
10308 main() {
10309 pthread_attr_t attr;
10310 pthread_t id;
10311 if (pthread_attr_init(&attr)) exit(-1);
10312 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10313 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10314 exit(0);
10315 }
10316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010318 ac_cv_pthread_system_supported=yes
10319else
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326
Guido van Rossum627b2d71993-12-24 10:39:16 +000010327fi
10328
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10330$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010331 if test "$ac_cv_pthread_system_supported" = "yes"; then
10332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010334
10335 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 for ac_func in pthread_sigmask
10337do :
10338 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010339if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010340 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010342_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010343 case $ac_sys_system in
10344 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010347
10348 ;;
10349 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010350fi
10351done
10352
Christian Heimesf77b4b22013-08-21 13:26:05 +020010353 for ac_func in pthread_atfork
10354do :
10355 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10356if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10357 cat >>confdefs.h <<_ACEOF
10358#define HAVE_PTHREAD_ATFORK 1
10359_ACEOF
10360
10361fi
10362done
10363
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010364fi
10365
10366
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010367# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10370$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010371# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010372if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010374 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010377 ipv6=no
10378 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10380$as_echo "yes" >&6; }
10381 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382
10383 ipv6=yes
10384 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010386else
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010390 /* AF_INET6 available check */
10391#include <sys/types.h>
10392#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010393int
10394main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010395{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010396int domain = AF_INET6;
10397 ;
10398 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010399}
Martin v. Löwis11437992002-04-12 09:54:03 +000010400_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010401if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10404$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010406
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010407else
Matthias Kloseb159a552010-04-25 21:00:44 +000010408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010411 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010412
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010416if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10418$as_echo_n "checking if RFC2553 API is available... " >&6; }
10419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010421
10422 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010423#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010424int
10425main ()
10426{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010427struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010428 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 ;
10430 return 0;
10431}
Matthias Kloseb159a552010-04-25 21:00:44 +000010432
Martin v. Löwis11437992002-04-12 09:54:03 +000010433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010434if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010435
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010437$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010438 ipv6=yes
10439
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010440else
Matthias Kloseb159a552010-04-25 21:00:44 +000010441
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010443$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010444 ipv6=no
10445
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010448fi
10449
10450if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010452
10453fi
10454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455fi
10456
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010457
10458ipv6type=unknown
10459ipv6lib=none
10460ipv6trylibc=no
10461
10462if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10464$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010465 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10466 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010467 case $i in
10468 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010470/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010471
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010472#include <netinet/in.h>
10473#ifdef IPV6_INRIA_VERSION
10474yes
10475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010476_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010479 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010480fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010481rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010482
10483 ;;
10484 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010487
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010488#include <netinet/in.h>
10489#ifdef __KAME__
10490yes
10491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010495 ipv6type=$i;
10496 ipv6lib=inet6
10497 ipv6libdir=/usr/local/v6/lib
10498 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010500rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010501
10502 ;;
10503 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010506
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010507#include <features.h>
10508#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10509yes
10510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010514 ipv6type=$i;
10515 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010516fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010517rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010518
10519 ;;
10520 linux-inet6)
10521 if test -d /usr/inet6; then
10522 ipv6type=$i
10523 ipv6lib=inet6
10524 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010525 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526 fi
10527 ;;
10528 solaris)
10529 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010530 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531 ipv6type=$i
10532 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533 fi
10534 fi
10535 ;;
10536 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010539
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010540#include <sys/param.h>
10541#ifdef _TOSHIBA_INET6
10542yes
10543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010544_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010547 ipv6type=$i;
10548 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010549 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010550fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010551rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552
10553 ;;
10554 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010557
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010558#include </usr/local/v6/include/sys/v6config.h>
10559#ifdef __V6D__
10560yes
10561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010562_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010565 ipv6type=$i;
10566 ipv6lib=v6;
10567 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010568 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010569fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010570rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571
10572 ;;
10573 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010576
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577#include <sys/param.h>
10578#ifdef _ZETA_MINAMI_INET6
10579yes
10580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010581_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584 ipv6type=$i;
10585 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010586 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010587fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010588rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589
10590 ;;
10591 esac
10592 if test "$ipv6type" != "unknown"; then
10593 break
10594 fi
10595 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10597$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598fi
10599
10600if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10601 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10602 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10603 echo "using lib$ipv6lib"
10604 else
10605 if test $ipv6trylibc = "yes"; then
10606 echo "using libc"
10607 else
10608 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10609 echo "You need to fetch lib$ipv6lib.a from appropriate"
10610 echo 'ipv6 kit and compile beforehand.'
10611 exit 1
10612 fi
10613 fi
10614fi
10615
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10617$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10619/* end confdefs.h. */
10620 /* CAN_RAW_FD_FRAMES available check */
10621#include <linux/can/raw.h>
10622int
10623main ()
10624{
10625int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10626 ;
10627 return 0;
10628}
10629_ACEOF
10630if ac_fn_c_try_compile "$LINENO"; then :
10631
10632
10633$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10634
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10636$as_echo "yes" >&6; }
10637
10638else
10639
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
10642
10643fi
10644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10645
Matthias Kloseb9621712010-04-24 17:59:49 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10647$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010649/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010650
10651 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010652int
10653main ()
10654{
10655FSIORefNum fRef = 0
10656 ;
10657 return 0;
10658}
Matthias Kloseb159a552010-04-25 21:00:44 +000010659
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010662
Matthias Kloseb159a552010-04-25 21:00:44 +000010663
Matthias Kloseb9621712010-04-24 17:59:49 +000010664$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10667$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010669else
Matthias Kloseb159a552010-04-25 21:00:44 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010673
10674fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10676
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010677# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10679$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683 withval=$with_doc_strings;
10684fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010685
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010686
10687if test -z "$with_doc_strings"
10688then with_doc_strings="yes"
10689fi
10690if test "$with_doc_strings" != "no"
10691then
10692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010694
10695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10697$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010698
Antoine Pitrou042b1282010-08-13 21:15:58 +000010699# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10701$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010706if test "$withval" != no
10707then
10708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10712$as_echo "yes" >&6; }
10713else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010715fi
10716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719fi
10720
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010721
10722# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10724$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010727if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728 withval=$with_pymalloc;
10729fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010730
Neil Schemenauera35c6882001-02-27 04:45:05 +000010731
Neil Schemenauer16c22972002-03-22 15:34:49 +000010732if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010733then
10734 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010735fi
10736if test "$with_pymalloc" != "no"
10737then
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010740
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010741 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10744$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010745
Benjamin Peterson05159c42009-12-03 03:01:27 +000010746# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10748$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010749
10750# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010751if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010752 withval=$with_valgrind;
10753else
10754 with_valgrind=no
10755fi
10756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10758$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010759if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 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 +020010761if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010764
10765else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010766 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010767
10768fi
10769
10770
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010771 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010772fi
10773
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010774# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010775
Guido van Rossum98935bf2001-09-05 19:13:16 +000010776DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010777
Guido van Rossume97ee181999-12-20 21:27:22 +000010778# the dlopen() function means we might want to use dynload_shlib.o. some
10779# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010780for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010781do :
10782 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010783if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010786_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010787
Guido van Rossume97ee181999-12-20 21:27:22 +000010788fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010789done
Guido van Rossume97ee181999-12-20 21:27:22 +000010790
Michael W. Hudson54241132001-12-07 15:38:26 +000010791
Guido van Rossume97ee181999-12-20 21:27:22 +000010792# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10793# loading of modules.
10794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10796$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010797if test -z "$DYNLOADFILE"
10798then
10799 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010800 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10801 if test "$ac_cv_func_dlopen" = yes
10802 then DYNLOADFILE="dynload_shlib.o"
10803 else DYNLOADFILE="dynload_aix.o"
10804 fi
10805 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010806 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010807 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10808 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010809 *)
10810 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10811 # out any dynamic loading
10812 if test "$ac_cv_func_dlopen" = yes
10813 then DYNLOADFILE="dynload_shlib.o"
10814 else DYNLOADFILE="dynload_stub.o"
10815 fi
10816 ;;
10817 esac
10818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10820$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010821if test "$DYNLOADFILE" != "dynload_stub.o"
10822then
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
Matthias Kloseb9621712010-04-24 17:59:49 +000010824$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010825
10826fi
10827
Neil Schemenauer4e425612001-06-19 15:44:15 +000010828# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10829
Michael W. Hudson54241132001-12-07 15:38:26 +000010830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10832$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010833if test -z "$MACHDEP_OBJS"
10834then
Jack Jansene578a632001-08-15 01:27:14 +000010835 MACHDEP_OBJS=$extra_machdep_objs
10836else
10837 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010838fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010839if test -z "$MACHDEP_OBJS"; then
10840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10841$as_echo "none" >&6; }
10842else
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10844$as_echo "$MACHDEP_OBJS" >&6; }
10845fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010846
Guido van Rossum627b2d71993-12-24 10:39:16 +000010847# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010848for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010849 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010850 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010851 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010852 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010853 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010854 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010855 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10856 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010857 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010858 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010859 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010860 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010861 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010862 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010863 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10864 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010865 sigaction sigaltstack siginterrupt sigpending sigrelse \
10866 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010867 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010868 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010869 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010870do :
10871 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10872ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010873if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010875#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010876_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010877
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010878fi
10879done
10880
Michael W. Hudson54241132001-12-07 15:38:26 +000010881
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010882ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10883 #include <dirent.h>
10884"
10885if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10886
10887$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10888
10889fi
10890
10891
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010892# For some functions, having a definition is not sufficient, since
10893# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10895$as_echo_n "checking for chroot... " >&6; }
10896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010898#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010899int
10900main ()
10901{
10902void *x=chroot
10903 ;
10904 return 0;
10905}
10906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010907if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010910
Matthias Kloseb159a552010-04-25 21:00:44 +000010911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010913else
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10915$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010916
10917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10920$as_echo_n "checking for link... " >&6; }
10921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010923#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010924int
10925main ()
10926{
10927void *x=link
10928 ;
10929 return 0;
10930}
10931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010935
Matthias Kloseb159a552010-04-25 21:00:44 +000010936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10940$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010941
10942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10945$as_echo_n "checking for symlink... " >&6; }
10946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010948#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010949int
10950main ()
10951{
10952void *x=symlink
10953 ;
10954 return 0;
10955}
10956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010960
Matthias Kloseb159a552010-04-25 21:00:44 +000010961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010962$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010966
10967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10970$as_echo_n "checking for fchdir... " >&6; }
10971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010972/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010973#include <unistd.h>
10974int
10975main ()
10976{
10977void *x=fchdir
10978 ;
10979 return 0;
10980}
10981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010985
Matthias Kloseb159a552010-04-25 21:00:44 +000010986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010991
10992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10995$as_echo_n "checking for fsync... " >&6; }
10996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010997/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010998#include <unistd.h>
10999int
11000main ()
11001{
11002void *x=fsync
11003 ;
11004 return 0;
11005}
11006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011010
Matthias Kloseb159a552010-04-25 21:00:44 +000011011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011016
11017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11020$as_echo_n "checking for fdatasync... " >&6; }
11021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011022/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011023#include <unistd.h>
11024int
11025main ()
11026{
11027void *x=fdatasync
11028 ;
11029 return 0;
11030}
11031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011035
Matthias Kloseb159a552010-04-25 21:00:44 +000011036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011037$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011038else
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11040$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011041
11042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11045$as_echo_n "checking for epoll... " >&6; }
11046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011047/* end confdefs.h. */
11048#include <sys/epoll.h>
11049int
11050main ()
11051{
11052void *x=epoll_create
11053 ;
11054 return 0;
11055}
11056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011058
Matthias Kloseb9621712010-04-24 17:59:49 +000011059$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011060
Matthias Kloseb159a552010-04-25 21:00:44 +000011061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011063else
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011066
11067fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11070$as_echo_n "checking for epoll_create1... " >&6; }
11071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11072/* end confdefs.h. */
11073#include <sys/epoll.h>
11074int
11075main ()
11076{
11077void *x=epoll_create1
11078 ;
11079 return 0;
11080}
11081_ACEOF
11082if ac_fn_c_try_compile "$LINENO"; then :
11083
11084$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11085
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11087$as_echo "yes" >&6; }
11088else
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11090$as_echo "no" >&6; }
11091
11092fi
11093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11095$as_echo_n "checking for kqueue... " >&6; }
11096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011097/* end confdefs.h. */
11098
11099#include <sys/types.h>
11100#include <sys/event.h>
11101
11102int
11103main ()
11104{
11105int x=kqueue()
11106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011113
Matthias Kloseb159a552010-04-25 21:00:44 +000011114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011115$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011116else
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011119
11120fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11123$as_echo_n "checking for prlimit... " >&6; }
11124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11125/* end confdefs.h. */
11126
11127#include <sys/time.h>
11128#include <sys/resource.h>
11129
11130int
11131main ()
11132{
11133void *x=prlimit
11134 ;
11135 return 0;
11136}
11137_ACEOF
11138if ac_fn_c_try_compile "$LINENO"; then :
11139
11140$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11141
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11143$as_echo "yes" >&6; }
11144else
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11146$as_echo "no" >&6; }
11147
11148fi
11149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11150
Martin v. Löwisd5843682002-11-21 20:41:28 +000011151# On some systems (eg. FreeBSD 5), we would find a definition of the
11152# functions ctermid_r, setgroups in the library, but no prototype
11153# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11154# address to avoid compiler warnings and potential miscompilations
11155# because of the missing prototypes.
11156
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11158$as_echo_n "checking for ctermid_r... " >&6; }
11159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011160/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011161
Martin v. Löwisd5843682002-11-21 20:41:28 +000011162#include <stdio.h>
11163
Martin v. Löwisd5843682002-11-21 20:41:28 +000011164int
11165main ()
11166{
11167void* p = ctermid_r
11168 ;
11169 return 0;
11170}
11171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011175
Matthias Kloseb159a552010-04-25 21:00:44 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011177$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011178else
Matthias Kloseb9621712010-04-24 17:59:49 +000011179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11180$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011181
11182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11184
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11186$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011187if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011188 $as_echo_n "(cached) " >&6
11189else
11190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011191/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011192#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011193int
11194main ()
11195{
11196void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011197
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011198 ;
11199 return 0;
11200}
11201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011202if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011203 ac_cv_flock_decl=yes
11204else
11205 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011206
11207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011209
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011210fi
11211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11212$as_echo "$ac_cv_flock_decl" >&6; }
11213if test "x${ac_cv_flock_decl}" = xyes; then
11214 for ac_func in flock
11215do :
11216 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011217if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011218 cat >>confdefs.h <<_ACEOF
11219#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011220_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011221
Antoine Pitroua3000072010-09-07 14:52:42 +000011222else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011224$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011225if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011226 $as_echo_n "(cached) " >&6
11227else
11228 ac_check_lib_save_LIBS=$LIBS
11229LIBS="-lbsd $LIBS"
11230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11231/* end confdefs.h. */
11232
11233/* Override any GCC internal prototype to avoid an error.
11234 Use char because int might match the return type of a GCC
11235 builtin and then its argument prototype would still apply. */
11236#ifdef __cplusplus
11237extern "C"
11238#endif
11239char flock ();
11240int
11241main ()
11242{
11243return flock ();
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248if ac_fn_c_try_link "$LINENO"; then :
11249 ac_cv_lib_bsd_flock=yes
11250else
11251 ac_cv_lib_bsd_flock=no
11252fi
11253rm -f core conftest.err conftest.$ac_objext \
11254 conftest$ac_exeext conftest.$ac_ext
11255LIBS=$ac_check_lib_save_LIBS
11256fi
11257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11258$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011259if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011260 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011261
11262
11263$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11264
11265
11266fi
11267
11268
11269fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011270done
11271
Antoine Pitroua3000072010-09-07 14:52:42 +000011272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273
Matthias Kloseb9621712010-04-24 17:59:49 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11275$as_echo_n "checking for getpagesize... " >&6; }
11276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011278
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011279#include <unistd.h>
11280
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011281int
11282main ()
11283{
11284void* p = getpagesize
11285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011292
Matthias Kloseb159a552010-04-25 21:00:44 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011298
11299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011301
Victor Stinner984890f2011-11-24 13:53:38 +010011302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11303$as_echo_n "checking for broken unsetenv... " >&6; }
11304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11305/* end confdefs.h. */
11306
11307#include <stdlib.h>
11308
11309int
11310main ()
11311{
11312int res = unsetenv("DUMMY")
11313 ;
11314 return 0;
11315}
11316_ACEOF
11317if ac_fn_c_try_compile "$LINENO"; then :
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
11320else
11321
11322$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11323
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11325$as_echo "yes" >&6; }
11326
11327fi
11328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11329
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011330for ac_prog in true
11331do
11332 # Extract the first word of "$ac_prog", so it can be a program name with args.
11333set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11335$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011336if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011338else
11339 if test -n "$TRUE"; then
11340 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11341else
11342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11343for as_dir in $PATH
11344do
11345 IFS=$as_save_IFS
11346 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011349 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 $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 +000011351 break 2
11352 fi
11353done
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011356
11357fi
11358fi
11359TRUE=$ac_cv_prog_TRUE
11360if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11362$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011363else
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011366fi
11367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011368
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011369 test -n "$TRUE" && break
11370done
11371test -n "$TRUE" || TRUE="/bin/true"
11372
11373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11375$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011376if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011378else
11379 ac_check_lib_save_LIBS=$LIBS
11380LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011382/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384/* Override any GCC internal prototype to avoid an error.
11385 Use char because int might match the return type of a GCC
11386 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011387#ifdef __cplusplus
11388extern "C"
11389#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011390char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011391int
11392main ()
11393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011400 ac_cv_lib_c_inet_aton=yes
11401else
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011404rm -f core conftest.err conftest.$ac_objext \
11405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011406LIBS=$ac_check_lib_save_LIBS
11407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11409$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011410if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011411 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011412else
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11414$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011415if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011417else
11418 ac_check_lib_save_LIBS=$LIBS
11419LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423/* Override any GCC internal prototype to avoid an error.
11424 Use char because int might match the return type of a GCC
11425 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011426#ifdef __cplusplus
11427extern "C"
11428#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011429char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011430int
11431main ()
11432{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011439 ac_cv_lib_resolv_inet_aton=yes
11440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011443rm -f core conftest.err conftest.$ac_objext \
11444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011445LIBS=$ac_check_lib_save_LIBS
11446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11448$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011449if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011450 cat >>confdefs.h <<_ACEOF
11451#define HAVE_LIBRESOLV 1
11452_ACEOF
11453
11454 LIBS="-lresolv $LIBS"
11455
11456fi
11457
11458
11459fi
11460
11461
Christian Heimesd0764e22007-12-04 15:00:33 +000011462# On Tru64, chflags seems to be present, but calling it will
11463# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11465$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011466if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011468else
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011470 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011471else
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011473/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011474
Christian Heimesd0764e22007-12-04 15:00:33 +000011475#include <sys/stat.h>
11476#include <unistd.h>
11477int main(int argc, char*argv[])
11478{
11479 if(chflags(argv[0], 0) != 0)
11480 return 1;
11481 return 0;
11482}
Ned Deily3eb67d52011-06-28 00:00:28 -070011483
Christian Heimesd0764e22007-12-04 15:00:33 +000011484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011486 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011487else
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011492fi
11493
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11497$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011498if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011500if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011501 ac_cv_have_chflags="yes"
11502else
11503 ac_cv_have_chflags="no"
11504fi
11505
11506fi
11507if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011510
11511fi
11512
Matthias Kloseb9621712010-04-24 17:59:49 +000011513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11514$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011515if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011517else
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011519 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011522/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011523
Christian Heimesd0764e22007-12-04 15:00:33 +000011524#include <sys/stat.h>
11525#include <unistd.h>
11526int main(int argc, char*argv[])
11527{
11528 if(lchflags(argv[0], 0) != 0)
11529 return 1;
11530 return 0;
11531}
Ned Deily3eb67d52011-06-28 00:00:28 -070011532
Christian Heimesd0764e22007-12-04 15:00:33 +000011533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011534if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011535 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011536else
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011541fi
11542
11543
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11546$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011547if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011548 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011549if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011550 ac_cv_have_lchflags="yes"
11551else
11552 ac_cv_have_lchflags="no"
11553fi
11554
11555fi
11556if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011559
11560fi
11561
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011562case $ac_sys_system/$ac_sys_release in
11563Darwin/*)
11564 _CUR_CFLAGS="${CFLAGS}"
11565 _CUR_LDFLAGS="${LDFLAGS}"
11566 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11567 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11568 ;;
11569esac
11570
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11572$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011575else
11576 ac_check_lib_save_LIBS=$LIBS
11577LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011579/* end confdefs.h. */
11580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581/* Override any GCC internal prototype to avoid an error.
11582 Use char because int might match the return type of a GCC
11583 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011584#ifdef __cplusplus
11585extern "C"
11586#endif
11587char inflateCopy ();
11588int
11589main ()
11590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011597 ac_cv_lib_z_inflateCopy=yes
11598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011601rm -f core conftest.err conftest.$ac_objext \
11602 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011603LIBS=$ac_check_lib_save_LIBS
11604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11606$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011610
11611fi
11612
11613
11614case $ac_sys_system/$ac_sys_release in
11615Darwin/*)
11616 CFLAGS="${_CUR_CFLAGS}"
11617 LDFLAGS="${_CUR_LDFLAGS}"
11618 ;;
11619esac
11620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11622$as_echo_n "checking for hstrerror... " >&6; }
11623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011624/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011625
Martin v. Löwise9416172003-05-03 10:12:45 +000011626#include <netdb.h>
11627
Martin v. Löwise9416172003-05-03 10:12:45 +000011628int
11629main ()
11630{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011631void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011632 ;
11633 return 0;
11634}
11635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011639
Matthias Kloseb159a552010-04-25 21:00:44 +000011640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011642else
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011645
11646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011647rm -f core conftest.err conftest.$ac_objext \
11648 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11651$as_echo_n "checking for inet_aton... " >&6; }
11652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011654
Martin v. Löwis86d66262006-02-17 08:40:11 +000011655#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011656#include <sys/socket.h>
11657#include <netinet/in.h>
11658#include <arpa/inet.h>
11659
Martin v. Löwise9416172003-05-03 10:12:45 +000011660int
11661main ()
11662{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011663void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011664 ;
11665 return 0;
11666}
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011671
Matthias Kloseb159a552010-04-25 21:00:44 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011673$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011677
11678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011679rm -f core conftest.err conftest.$ac_objext \
11680 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11683$as_echo_n "checking for inet_pton... " >&6; }
11684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011686
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011687#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011688#include <sys/socket.h>
11689#include <netinet/in.h>
11690#include <arpa/inet.h>
11691
Martin v. Löwise9416172003-05-03 10:12:45 +000011692int
11693main ()
11694{
11695void* p = inet_pton
11696 ;
11697 return 0;
11698}
11699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011703
Matthias Kloseb159a552010-04-25 21:00:44 +000011704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011706else
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011709
11710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011712
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011713# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11715$as_echo_n "checking for setgroups... " >&6; }
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011717/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011718
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011719#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011720#ifdef HAVE_GRP_H
11721#include <grp.h>
11722#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011723
Martin v. Löwisd5843682002-11-21 20:41:28 +000011724int
11725main ()
11726{
11727void* p = setgroups
11728 ;
11729 return 0;
11730}
11731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011733
Matthias Kloseb9621712010-04-24 17:59:49 +000011734$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011735
Matthias Kloseb159a552010-04-25 21:00:44 +000011736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11740$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011741
11742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011744
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011745# check for openpty and forkpty
11746
11747for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011748do :
11749 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011750if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011753_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011755else
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11757$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011760else
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011762LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766/* Override any GCC internal prototype to avoid an error.
11767 Use char because int might match the return type of a GCC
11768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011769#ifdef __cplusplus
11770extern "C"
11771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011772char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011773int
11774main ()
11775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 ;
11778 return 0;
11779}
11780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011786rm -f core conftest.err conftest.$ac_objext \
11787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011788LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11791$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011792if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011794 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011795else
Matthias Kloseb9621712010-04-24 17:59:49 +000011796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11797$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011798if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011800else
11801 ac_check_lib_save_LIBS=$LIBS
11802LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011804/* end confdefs.h. */
11805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011806/* Override any GCC internal prototype to avoid an error.
11807 Use char because int might match the return type of a GCC
11808 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011809#ifdef __cplusplus
11810extern "C"
11811#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011812char openpty ();
11813int
11814main ()
11815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011817 ;
11818 return 0;
11819}
11820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011822 ac_cv_lib_bsd_openpty=yes
11823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011826rm -f core conftest.err conftest.$ac_objext \
11827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011828LIBS=$ac_check_lib_save_LIBS
11829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11831$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011834 LIBS="$LIBS -lbsd"
11835fi
11836
11837
11838fi
11839
Fred Drake8cef4cf2000-06-28 16:40:38 +000011840
11841fi
11842done
11843
11844for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011845do :
11846 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011850_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011851
Fred Drake8cef4cf2000-06-28 16:40:38 +000011852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11854$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011855if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011857else
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011859LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011863/* Override any GCC internal prototype to avoid an error.
11864 Use char because int might match the return type of a GCC
11865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011866#ifdef __cplusplus
11867extern "C"
11868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011869char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011870int
11871main ()
11872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011873return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 ;
11875 return 0;
11876}
11877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011879 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011883rm -f core conftest.err conftest.$ac_objext \
11884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011885LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11888$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011889if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011891 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11894$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011897else
11898 ac_check_lib_save_LIBS=$LIBS
11899LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011901/* end confdefs.h. */
11902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011903/* Override any GCC internal prototype to avoid an error.
11904 Use char because int might match the return type of a GCC
11905 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011906#ifdef __cplusplus
11907extern "C"
11908#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011909char forkpty ();
11910int
11911main ()
11912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011913return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011914 ;
11915 return 0;
11916}
11917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011919 ac_cv_lib_bsd_forkpty=yes
11920else
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011923rm -f core conftest.err conftest.$ac_objext \
11924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011925LIBS=$ac_check_lib_save_LIBS
11926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11928$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011929if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011931 LIBS="$LIBS -lbsd"
11932fi
11933
11934
11935fi
11936
Fred Drake8cef4cf2000-06-28 16:40:38 +000011937
11938fi
11939done
11940
Jack Jansendd19cf82001-12-06 22:36:17 +000011941
Christian Heimesb186d002008-03-18 15:15:01 +000011942# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011943for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011944do :
11945 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011946if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011947 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011949_ACEOF
11950
11951fi
11952done
11953
11954
Michael W. Hudson54241132001-12-07 15:38:26 +000011955# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011956for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011957do :
11958 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11959ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011960if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011962#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011963_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011964
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011966done
11967
Michael W. Hudson54241132001-12-07 15:38:26 +000011968
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011969ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011970if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011971 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011972
Martin v. Löwis1142de32002-03-29 16:28:31 +000011973else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011974 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011975 *" dup2.$ac_objext "* ) ;;
11976 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011978esac
11979
Martin v. Löwis1142de32002-03-29 16:28:31 +000011980fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011981
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011982ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011983if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011984 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11985
11986else
11987 case " $LIBOBJS " in
11988 *" strdup.$ac_objext "* ) ;;
11989 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11990 ;;
11991esac
11992
11993fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994
11995
11996for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011997do :
11998 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011999if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012001#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012004/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012005#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012006int
12007main ()
12008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012017
Guido van Rossum627b2d71993-12-24 10:39:16 +000012018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012020
Guido van Rossum627b2d71993-12-24 10:39:16 +000012021fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012022done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012023
Jack Jansen150753c2003-03-29 22:07:47 +000012024for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012025do :
12026 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012027if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012028 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012029#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012032/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012033#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012034int
12035main ()
12036{
12037setpgrp(0,0);
12038 ;
12039 return 0;
12040}
12041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012045
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012048
12049fi
12050done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012051
Thomas Wouters3a584202000-08-05 23:28:51 +000012052for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012053do :
12054 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012055if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012061#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012062int
12063main ()
12064{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012070if ac_fn_c_try_compile "$LINENO"; then :
12071
Guido van Rossum627b2d71993-12-24 10:39:16 +000012072else
Skip Montanaro6dead952003-09-25 14:50:04 +000012073
Matthias Kloseb9621712010-04-24 17:59:49 +000012074$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012081done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082
Michael W. Hudson54241132001-12-07 15:38:26 +000012083
Victor Stinnere0be4232011-10-25 13:06:09 +020012084for ac_func in clock_gettime
12085do :
12086 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12087if test "x$ac_cv_func_clock_gettime" = xyes; then :
12088 cat >>confdefs.h <<_ACEOF
12089#define HAVE_CLOCK_GETTIME 1
12090_ACEOF
12091
12092else
12093
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12095$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12096if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12097 $as_echo_n "(cached) " >&6
12098else
12099 ac_check_lib_save_LIBS=$LIBS
12100LIBS="-lrt $LIBS"
12101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102/* end confdefs.h. */
12103
12104/* Override any GCC internal prototype to avoid an error.
12105 Use char because int might match the return type of a GCC
12106 builtin and then its argument prototype would still apply. */
12107#ifdef __cplusplus
12108extern "C"
12109#endif
12110char clock_gettime ();
12111int
12112main ()
12113{
12114return clock_gettime ();
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119if ac_fn_c_try_link "$LINENO"; then :
12120 ac_cv_lib_rt_clock_gettime=yes
12121else
12122 ac_cv_lib_rt_clock_gettime=no
12123fi
12124rm -f core conftest.err conftest.$ac_objext \
12125 conftest$ac_exeext conftest.$ac_ext
12126LIBS=$ac_check_lib_save_LIBS
12127fi
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12129$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12130if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12131
Victor Stinner7efb8332014-08-29 15:41:08 +020012132 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012133 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12134
12135
12136$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12137
12138
12139fi
12140
12141
12142fi
12143done
12144
12145
12146for ac_func in clock_getres
12147do :
12148 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12149if test "x$ac_cv_func_clock_getres" = xyes; then :
12150 cat >>confdefs.h <<_ACEOF
12151#define HAVE_CLOCK_GETRES 1
12152_ACEOF
12153
12154else
12155
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12157$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12158if ${ac_cv_lib_rt_clock_getres+:} false; then :
12159 $as_echo_n "(cached) " >&6
12160else
12161 ac_check_lib_save_LIBS=$LIBS
12162LIBS="-lrt $LIBS"
12163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164/* end confdefs.h. */
12165
12166/* Override any GCC internal prototype to avoid an error.
12167 Use char because int might match the return type of a GCC
12168 builtin and then its argument prototype would still apply. */
12169#ifdef __cplusplus
12170extern "C"
12171#endif
12172char clock_getres ();
12173int
12174main ()
12175{
12176return clock_getres ();
12177 ;
12178 return 0;
12179}
12180_ACEOF
12181if ac_fn_c_try_link "$LINENO"; then :
12182 ac_cv_lib_rt_clock_getres=yes
12183else
12184 ac_cv_lib_rt_clock_getres=no
12185fi
12186rm -f core conftest.err conftest.$ac_objext \
12187 conftest$ac_exeext conftest.$ac_ext
12188LIBS=$ac_check_lib_save_LIBS
12189fi
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12191$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12192if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12193
12194 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12195
12196
12197fi
12198
12199
12200fi
12201done
12202
12203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12205$as_echo_n "checking for major... " >&6; }
12206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012207/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012208
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012209#if defined(MAJOR_IN_MKDEV)
12210#include <sys/mkdev.h>
12211#elif defined(MAJOR_IN_SYSMACROS)
12212#include <sys/sysmacros.h>
12213#else
12214#include <sys/types.h>
12215#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012216
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012217int
12218main ()
12219{
12220
12221 makedev(major(0),minor(0));
12222
12223 ;
12224 return 0;
12225}
12226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012228
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12233$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012234
12235else
Skip Montanaro6dead952003-09-25 14:50:04 +000012236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12238$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012239
12240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241rm -f core conftest.err conftest.$ac_objext \
12242 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012243
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012244# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012245# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12247$as_echo_n "checking for getaddrinfo... " >&6; }
12248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012250
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012251#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012252#include <sys/socket.h>
12253#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012254#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256int
12257main ()
12258{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012259getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012265 have_getaddrinfo=yes
12266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269rm -f core conftest.err conftest.$ac_objext \
12270 conftest$ac_exeext conftest.$ac_ext
12271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12272$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012273if test $have_getaddrinfo = yes
12274then
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12276$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012281
12282if test "${enable_ipv6+set}" = set; then
12283 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12284else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012285 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012286fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012287else
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290
Stefan Krah19c21392012-11-22 23:47:32 +010012291#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012292#include <sys/types.h>
12293#include <netdb.h>
12294#include <string.h>
12295#include <sys/socket.h>
12296#include <netinet/in.h>
12297
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012298int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012299{
12300 int passive, gaierr, inet4 = 0, inet6 = 0;
12301 struct addrinfo hints, *ai, *aitop;
12302 char straddr[INET6_ADDRSTRLEN], strport[16];
12303
12304 for (passive = 0; passive <= 1; passive++) {
12305 memset(&hints, 0, sizeof(hints));
12306 hints.ai_family = AF_UNSPEC;
12307 hints.ai_flags = passive ? AI_PASSIVE : 0;
12308 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012309 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012310 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12311 (void)gai_strerror(gaierr);
12312 goto bad;
12313 }
12314 for (ai = aitop; ai; ai = ai->ai_next) {
12315 if (ai->ai_addr == NULL ||
12316 ai->ai_addrlen == 0 ||
12317 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12318 straddr, sizeof(straddr), strport, sizeof(strport),
12319 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12320 goto bad;
12321 }
12322 switch (ai->ai_family) {
12323 case AF_INET:
12324 if (strcmp(strport, "54321") != 0) {
12325 goto bad;
12326 }
12327 if (passive) {
12328 if (strcmp(straddr, "0.0.0.0") != 0) {
12329 goto bad;
12330 }
12331 } else {
12332 if (strcmp(straddr, "127.0.0.1") != 0) {
12333 goto bad;
12334 }
12335 }
12336 inet4++;
12337 break;
12338 case AF_INET6:
12339 if (strcmp(strport, "54321") != 0) {
12340 goto bad;
12341 }
12342 if (passive) {
12343 if (strcmp(straddr, "::") != 0) {
12344 goto bad;
12345 }
12346 } else {
12347 if (strcmp(straddr, "::1") != 0) {
12348 goto bad;
12349 }
12350 }
12351 inet6++;
12352 break;
12353 case AF_UNSPEC:
12354 goto bad;
12355 break;
12356 default:
12357 /* another family support? */
12358 break;
12359 }
12360 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012361 freeaddrinfo(aitop);
12362 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012363 }
12364
12365 if (!(inet4 == 0 || inet4 == 2))
12366 goto bad;
12367 if (!(inet6 == 0 || inet6 == 2))
12368 goto bad;
12369
12370 if (aitop)
12371 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012372 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012373
12374 bad:
12375 if (aitop)
12376 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012377 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012378}
12379
Martin v. Löwis11437992002-04-12 09:54:03 +000012380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012382 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012390fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12395$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12396
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012397if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012398then
12399 if test $ipv6 = yes
12400 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401 echo 'Fatal: You must get working getaddrinfo() function.'
12402 echo ' or you can specify "--disable-ipv6"'.
12403 exit 1
12404 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012405else
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012408
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012409fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012410
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012411for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012412do :
12413 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012414if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012417_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012418
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419fi
12420done
12421
Michael W. Hudson54241132001-12-07 15:38:26 +000012422
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12425$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012426if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012428else
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431#include <sys/types.h>
12432#include <sys/time.h>
12433#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
Martin v. Löwis11437992002-04-12 09:54:03 +000012435int
12436main ()
12437{
12438if ((struct tm *) 0)
12439return 0;
12440 ;
12441 return 0;
12442}
12443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012446else
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12452$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012453if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456
12457fi
12458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12460$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012461if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463else
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012465/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466#include <sys/types.h>
12467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Martin v. Löwis11437992002-04-12 09:54:03 +000012469int
12470main ()
12471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472struct tm tm;
12473 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 ;
12476 return 0;
12477}
12478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012479if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480 ac_cv_struct_tm=time.h
12481else
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12487$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012488if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491
12492fi
12493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494ac_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 +000012495#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497"
Victor Stinnere0be4232011-10-25 13:06:09 +020012498if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
12500cat >>confdefs.h <<_ACEOF
12501#define HAVE_STRUCT_TM_TM_ZONE 1
12502_ACEOF
12503
12504
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012505fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012506
Martin v. Löwis11437992002-04-12 09:54:03 +000012507if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510
12511else
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12513"
Victor Stinnere0be4232011-10-25 13:06:09 +020012514if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516else
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518fi
12519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012521#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522_ACEOF
12523
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12525$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012530/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012531#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532#if !HAVE_DECL_TZNAME
12533extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Martin v. Löwis11437992002-04-12 09:54:03 +000012536int
12537main ()
12538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ;
12541 return 0;
12542}
12543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012544if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012545 ac_cv_var_tzname=yes
12546else
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549rm -f core conftest.err conftest.$ac_objext \
12550 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12553$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012554 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Matthias Kloseb9621712010-04-24 17:59:49 +000012556$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558 fi
12559fi
12560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561ac_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 +020012562if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012563
12564cat >>confdefs.h <<_ACEOF
12565#define HAVE_STRUCT_STAT_ST_RDEV 1
12566_ACEOF
12567
12568
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012569fi
12570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571ac_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 +020012572if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012573
Martin v. Löwis11437992002-04-12 09:54:03 +000012574cat >>confdefs.h <<_ACEOF
12575#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12576_ACEOF
12577
12578
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012579fi
12580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581ac_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 +020012582if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012583
12584cat >>confdefs.h <<_ACEOF
12585#define HAVE_STRUCT_STAT_ST_FLAGS 1
12586_ACEOF
12587
12588
12589fi
12590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591ac_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 +020012592if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012593
12594cat >>confdefs.h <<_ACEOF
12595#define HAVE_STRUCT_STAT_ST_GEN 1
12596_ACEOF
12597
12598
12599fi
12600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601ac_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 +020012602if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012603
12604cat >>confdefs.h <<_ACEOF
12605#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12606_ACEOF
12607
12608
12609fi
12610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611ac_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 +020012612if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012613
Martin v. Löwis11437992002-04-12 09:54:03 +000012614cat >>confdefs.h <<_ACEOF
12615#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12616_ACEOF
12617
12618
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012619fi
12620
Stefan Krah267b6392016-04-26 01:09:18 +020012621ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12622 #include <sys/types.h>
12623 #include <pwd.h>
12624
12625"
12626if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12627
12628cat >>confdefs.h <<_ACEOF
12629#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12630_ACEOF
12631
12632
12633fi
12634ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12635 #include <sys/types.h>
12636 #include <pwd.h>
12637
12638"
12639if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12640
12641cat >>confdefs.h <<_ACEOF
12642#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12643_ACEOF
12644
12645
12646fi
12647
Michael W. Hudson54241132001-12-07 15:38:26 +000012648
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12650$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012651if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653else
Matthias Kloseb159a552010-04-25 21:00:44 +000012654
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012657#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667 ac_cv_header_time_altzone=yes
12668else
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673fi
12674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12676$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Matthias Kloseb9621712010-04-24 17:59:49 +000012679$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680
12681fi
12682
Guido van Rossumda88dad1995-01-26 00:46:29 +000012683was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12685$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012688
12689#include <sys/types.h>
12690#include <sys/select.h>
12691#include <sys/time.h>
12692
Martin v. Löwis11437992002-04-12 09:54:03 +000012693int
12694main ()
12695{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696;
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ;
12698 return 0;
12699}
12700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012701if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012702
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012706 was_it_defined=yes
12707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12711$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12714$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012715if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012720#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012721int
12722main ()
12723{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012724struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ;
12726 return 0;
12727}
12728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012730 ac_cv_struct_addrinfo=yes
12731else
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12735fi
12736
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12738$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012739if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742
12743fi
12744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12746$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012747if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012752
12753# include <sys/types.h>
12754# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012755int
12756main ()
12757{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012758struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ;
12760 return 0;
12761}
12762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012764 ac_cv_struct_sockaddr_storage=yes
12765else
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12769fi
12770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12772$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012773if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776
12777fi
12778
Christian Heimesdffa3942016-09-05 23:54:41 +020012779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12780$as_echo_n "checking for sockaddr_alg... " >&6; }
12781if ${ac_cv_struct_sockaddr_alg+:} false; then :
12782 $as_echo_n "(cached) " >&6
12783else
12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12785/* end confdefs.h. */
12786
12787# include <sys/types.h>
12788# include <sys/socket.h>
12789# include <linux/if_alg.h>
12790int
12791main ()
12792{
12793struct sockaddr_alg s
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798if ac_fn_c_try_compile "$LINENO"; then :
12799 ac_cv_struct_sockaddr_alg=yes
12800else
12801 ac_cv_struct_sockaddr_alg=no
12802fi
12803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12804fi
12805
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12807$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12808if test $ac_cv_struct_sockaddr_alg = yes; then
12809
12810$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12811
12812fi
12813
Guido van Rossum627b2d71993-12-24 10:39:16 +000012814# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12817$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012818if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012823$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012824int
12825main ()
12826{
12827static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012828test_array [0] = 0;
12829return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
12831 ;
12832 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012833}
Martin v. Löwis11437992002-04-12 09:54:03 +000012834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012835if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012836 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12843$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846
12847fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12850$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012851if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012853else
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856
Martin v. Löwis11437992002-04-12 09:54:03 +000012857int
12858main ()
12859{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012860
Martin v. Löwis11437992002-04-12 09:54:03 +000012861#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012862 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012864 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866 char const *const *pcpcc;
12867 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 /* NEC SVR4.0.2 mips cc rejects this. */
12869 struct point {int x, y;};
12870 static struct point const zero = {0,0};
12871 /* AIX XL C 1.02.0.0 rejects this.
12872 It does not let you subtract one const X* pointer from another in
12873 an arm of an if-expression whose if-part is not a constant
12874 expression */
12875 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 ++pcpcc;
12879 ppc = (char**) pcpcc;
12880 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012881 { /* SCO 3.2v4 cc rejects this sort of thing. */
12882 char tx;
12883 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 }
12889 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12890 int x[] = {25, 17};
12891 const int *foo = &x[0];
12892 ++foo;
12893 }
12894 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12895 typedef const int *iptr;
12896 iptr p = 0;
12897 ++p;
12898 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012899 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012901 struct s { int j; const int *ap[3]; } bx;
12902 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 }
12904 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12905 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012909#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ;
12912 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012913}
Martin v. Löwis11437992002-04-12 09:54:03 +000012914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916 ac_cv_c_const=yes
12917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12923$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927
12928fi
12929
Michael W. Hudson54241132001-12-07 15:38:26 +000012930
Guido van Rossumda88dad1995-01-26 00:46:29 +000012931works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12933$as_echo_n "checking for working volatile... " >&6; }
12934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012936
Martin v. Löwis11437992002-04-12 09:54:03 +000012937int
12938main ()
12939{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012940volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 ;
12942 return 0;
12943}
12944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012945if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012946 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012947else
Skip Montanaro6dead952003-09-25 14:50:04 +000012948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012950
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012951
Guido van Rossum627b2d71993-12-24 10:39:16 +000012952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12955$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012956
Guido van Rossumda88dad1995-01-26 00:46:29 +000012957works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12959$as_echo_n "checking for working signed char... " >&6; }
12960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012962
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 ;
12968 return 0;
12969}
12970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012972 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012973else
Skip Montanaro6dead952003-09-25 14:50:04 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012976
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012977
Guido van Rossum7f43da71994-08-01 12:15:30 +000012978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12981$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012982
Guido van Rossumda88dad1995-01-26 00:46:29 +000012983have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12985$as_echo_n "checking for prototypes... " >&6; }
12986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012988int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012989int
12990main ()
12991{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 ;
12994 return 0;
12995}
12996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Matthias Kloseb159a552010-04-25 21:00:44 +000013001 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13005$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006
Guido van Rossumda88dad1995-01-26 00:46:29 +000013007works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13009$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013011/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013012
13013#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013014int foo(int x, ...) {
13015 va_list va;
13016 va_start(va, x);
13017 va_arg(va, int);
13018 va_arg(va, char *);
13019 va_arg(va, double);
13020 return 0;
13021}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023int
13024main ()
13025{
Guido van Rossum90eea071996-08-30 20:58:57 +000013026return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 ;
13028 return 0;
13029}
13030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013032
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013035
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013036 works=yes
13037
Guido van Rossum627b2d71993-12-24 10:39:16 +000013038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13041$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013042
Martin v. Löwisd6320502004-08-12 13:45:08 +000013043# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13045$as_echo_n "checking for socketpair... " >&6; }
13046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013047/* end confdefs.h. */
13048
13049#include <sys/types.h>
13050#include <sys/socket.h>
13051
13052int
13053main ()
13054{
13055void *x=socketpair
13056 ;
13057 return 0;
13058}
13059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013063
Matthias Kloseb159a552010-04-25 21:00:44 +000013064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013065$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13068$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013069
13070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013072
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013073# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13075$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013077/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013078#include <sys/types.h>
13079#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013080int
13081main ()
13082{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013083struct sockaddr x;
13084x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_compile "$LINENO"; then :
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13091$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013094
13095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13097$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013098
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013101
Guido van Rossumda88dad1995-01-26 00:46:29 +000013102va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13104$as_echo_n "checking whether va_list is an array... " >&6; }
13105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107
13108#ifdef HAVE_STDARG_PROTOTYPES
13109#include <stdarg.h>
13110#else
13111#include <varargs.h>
13112#endif
13113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114int
13115main ()
13116{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013117va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 ;
13119 return 0;
13120}
13121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013122if ac_fn_c_try_compile "$LINENO"; then :
13123
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124else
Skip Montanaro6dead952003-09-25 14:50:04 +000013125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013128
Guido van Rossumda88dad1995-01-26 00:46:29 +000013129 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13134$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013136# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013137
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013140if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13145$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013146 OLD_CFLAGS=$CFLAGS
13147 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013150
13151# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
Martin v. Löwis11437992002-04-12 09:54:03 +000013153int
13154main ()
13155{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013156
13157 char *name;
13158 struct hostent *he, *res;
13159 char buffer[2048];
13160 int buflen = 2048;
13161 int h_errnop;
13162
13163 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013164
13165 ;
13166 return 0;
13167}
13168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13177$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013179else
Skip Montanaro6dead952003-09-25 14:50:04 +000013180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13182$as_echo "no" >&6; }
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13184$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013186/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013187
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013188# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013189
Martin v. Löwis11437992002-04-12 09:54:03 +000013190int
13191main ()
13192{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013193
13194 char *name;
13195 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013196 char buffer[2048];
13197 int buflen = 2048;
13198 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013199
Matthias Kloseb159a552010-04-25 21:00:44 +000013200 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013201
13202 ;
13203 return 0;
13204}
13205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013209
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
Matthias Kloseb159a552010-04-25 21:00:44 +000013211$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13214$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013216else
Skip Montanaro6dead952003-09-25 14:50:04 +000013217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13219$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13221$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13223/* end confdefs.h. */
13224
13225# include <netdb.h>
13226
13227int
13228main ()
13229{
13230
13231 char *name;
13232 struct hostent *he;
13233 struct hostent_data data;
13234
13235 (void) gethostbyname_r(name, he, &data);
13236
13237 ;
13238 return 0;
13239}
13240_ACEOF
13241if ac_fn_c_try_compile "$LINENO"; then :
13242
13243 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13244
13245
13246$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13247
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13249$as_echo "yes" >&6; }
13250
13251else
13252
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13254$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013261
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013264 CFLAGS=$OLD_CFLAGS
13265
13266else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 for ac_func in gethostbyname
13269do :
13270 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013271if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013274_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013275
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013276fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013277done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013278
Michael W. Hudson54241132001-12-07 15:38:26 +000013279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013280fi
13281
Michael W. Hudson54241132001-12-07 15:38:26 +000013282
13283
13284
13285
13286
13287
Guido van Rossum627b2d71993-12-24 10:39:16 +000013288# checks for system services
13289# (none yet)
13290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013292ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013293if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013294
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13297$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013298if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300else
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013302LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306/* Override any GCC internal prototype to avoid an error.
13307 Use char because int might match the return type of a GCC
13308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013309#ifdef __cplusplus
13310extern "C"
13311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013312char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013313int
13314main ()
13315{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 ;
13318 return 0;
13319}
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013326rm -f core conftest.err conftest.$ac_objext \
13327 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013328LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13331$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 cat >>confdefs.h <<_ACEOF
13334#define HAVE_LIBIEEE 1
13335_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013337 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338
Guido van Rossum627b2d71993-12-24 10:39:16 +000013339fi
13340
Michael W. Hudson54241132001-12-07 15:38:26 +000013341
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013342fi
13343
Michael W. Hudson54241132001-12-07 15:38:26 +000013344
Guido van Rossum7f253911997-05-09 02:42:48 +000013345# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13347$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013352if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013353then
13354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13358$as_echo "yes" >&6; }
13359else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13360$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013361fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13364$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365fi
13366
Guido van Rossum7f253911997-05-09 02:42:48 +000013367
Guido van Rossum7f43da71994-08-01 12:15:30 +000013368# check for --with-libm=...
13369
Guido van Rossum563e7081996-09-10 18:20:48 +000013370case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013371Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013372*) LIBM=-lm
13373esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13375$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013380if test "$withval" = no
13381then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13383$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013384elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013385then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13387$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013388else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013389fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13392$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393fi
13394
Guido van Rossum7f43da71994-08-01 12:15:30 +000013395
13396# check for --with-libc=...
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13399$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013402if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013404if test "$withval" = no
13405then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13407$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013408elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013409then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13411$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013412else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013413fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013414else
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13416$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417fi
13418
Guido van Rossum7f43da71994-08-01 12:15:30 +000013419
Stefan Krah1919b7e2012-03-21 18:25:23 +010013420# **************************************
13421# * Check for gcc x64 inline assembler *
13422# **************************************
13423
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13425$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13427/* end confdefs.h. */
13428
13429int
13430main ()
13431{
13432
13433 __asm__ __volatile__ ("movq %rcx, %rax");
13434
13435 ;
13436 return 0;
13437}
13438_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013439if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013440 have_gcc_asm_for_x64=yes
13441else
13442 have_gcc_asm_for_x64=no
13443fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013444rm -f core conftest.err conftest.$ac_objext \
13445 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13447$as_echo "$have_gcc_asm_for_x64" >&6; }
13448if test "$have_gcc_asm_for_x64" = yes
13449then
13450
13451$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13452
13453fi
13454
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013455# **************************************************
13456# * Check for various properties of floating point *
13457# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13460$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013461if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013463else
13464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013466 ac_cv_little_endian_double=no
13467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013469/* end confdefs.h. */
13470
13471#include <string.h>
13472int main() {
13473 double x = 9006104071832581.0;
13474 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13475 return 0;
13476 else
13477 return 1;
13478}
13479
13480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013482 ac_cv_little_endian_double=yes
13483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13487 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013488fi
13489
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013490fi
13491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13493$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013494if test "$ac_cv_little_endian_double" = yes
13495then
13496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013498
13499fi
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13502$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013503if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013505else
13506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013508 ac_cv_big_endian_double=no
13509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013511/* end confdefs.h. */
13512
13513#include <string.h>
13514int main() {
13515 double x = 9006104071832581.0;
13516 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13517 return 0;
13518 else
13519 return 1;
13520}
13521
13522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013524 ac_cv_big_endian_double=yes
13525else
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013530fi
13531
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013532fi
13533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13535$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013536if test "$ac_cv_big_endian_double" = yes
13537then
13538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013540
13541fi
13542
13543# Some ARM platforms use a mixed-endian representation for doubles.
13544# While Python doesn't currently have full support for these platforms
13545# (see e.g., issue 1762561), we can at least make sure that float <-> string
13546# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13548$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013549if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013551else
13552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013554 ac_cv_mixed_endian_double=no
13555else
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013557/* end confdefs.h. */
13558
13559#include <string.h>
13560int main() {
13561 double x = 9006104071832581.0;
13562 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13563 return 0;
13564 else
13565 return 1;
13566}
13567
13568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013569if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013570 ac_cv_mixed_endian_double=yes
13571else
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13575 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013576fi
13577
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013578fi
13579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13581$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013582if test "$ac_cv_mixed_endian_double" = yes
13583then
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013586
13587fi
13588
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013589# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013590# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013591# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013592# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013593# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013594# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013595
13596# This inline assembler syntax may also work for suncc and icc,
13597# so we try it on all platforms.
13598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13600$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013602/* end confdefs.h. */
13603
13604int
13605main ()
13606{
13607
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013608 unsigned short cw;
13609 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13610 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013611
13612 ;
13613 return 0;
13614}
13615_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013616if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013617 have_gcc_asm_for_x87=yes
13618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013620fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013621rm -f core conftest.err conftest.$ac_objext \
13622 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13624$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013625if test "$have_gcc_asm_for_x87" = yes
13626then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013630fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13633$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13635/* end confdefs.h. */
13636
13637int
13638main ()
13639{
13640
13641 unsigned int fpcr;
13642 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13643 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13644
13645 ;
13646 return 0;
13647}
13648_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013649if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013650 have_gcc_asm_for_mc68881=yes
13651else
13652 have_gcc_asm_for_mc68881=no
13653fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013654rm -f core conftest.err conftest.$ac_objext \
13655 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13657$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13658if test "$have_gcc_asm_for_mc68881" = yes
13659then
13660
13661$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13662
13663fi
13664
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013665# Detect whether system arithmetic is subject to x87-style double
13666# rounding issues. The result of this test has little meaning on non
13667# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13668# mode is round-to-nearest and double rounding issues are present, and
13669# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13671$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013672# $BASECFLAGS may affect the result
13673ac_save_cc="$CC"
13674CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013675if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013676 ac_cv_x87_double_rounding=no
13677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013679/* end confdefs.h. */
13680
13681#include <stdlib.h>
13682#include <math.h>
13683int main() {
13684 volatile double x, y, z;
13685 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13686 x = 0.99999999999999989; /* 1-2**-53 */
13687 y = 1./x;
13688 if (y != 1.)
13689 exit(0);
13690 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13691 x = 1e16;
13692 y = 2.99999;
13693 z = x + y;
13694 if (z != 1e16+4.)
13695 exit(0);
13696 /* both tests show evidence of double rounding */
13697 exit(1);
13698}
13699
13700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013702 ac_cv_x87_double_rounding=no
13703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013708fi
13709
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013710CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13712$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013713if test "$ac_cv_x87_double_rounding" = yes
13714then
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013717
13718fi
13719
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720# ************************************
13721# * Check for mathematical functions *
13722# ************************************
13723
13724LIBS_SAVE=$LIBS
13725LIBS="$LIBS $LIBM"
13726
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013727for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13728do :
13729 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13730ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013731if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013732 cat >>confdefs.h <<_ACEOF
13733#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13734_ACEOF
13735
13736fi
13737done
13738
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013739for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013740do :
13741 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13742ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013743if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013744 cat >>confdefs.h <<_ACEOF
13745#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13746_ACEOF
13747
13748fi
13749done
13750
13751ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13752"
Victor Stinnere0be4232011-10-25 13:06:09 +020013753if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013754 ac_have_decl=1
13755else
13756 ac_have_decl=0
13757fi
13758
13759cat >>confdefs.h <<_ACEOF
13760#define HAVE_DECL_ISINF $ac_have_decl
13761_ACEOF
13762ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13763"
Victor Stinnere0be4232011-10-25 13:06:09 +020013764if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013765 ac_have_decl=1
13766else
13767 ac_have_decl=0
13768fi
13769
13770cat >>confdefs.h <<_ACEOF
13771#define HAVE_DECL_ISNAN $ac_have_decl
13772_ACEOF
13773ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13774"
Victor Stinnere0be4232011-10-25 13:06:09 +020013775if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013776 ac_have_decl=1
13777else
13778 ac_have_decl=0
13779fi
13780
13781cat >>confdefs.h <<_ACEOF
13782#define HAVE_DECL_ISFINITE $ac_have_decl
13783_ACEOF
13784
13785
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013786# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13787# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13789$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013790if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013792else
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013795 ac_cv_tanh_preserves_zero_sign=no
13796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013798/* end confdefs.h. */
13799
13800#include <math.h>
13801#include <stdlib.h>
13802int main() {
13803 /* return 0 if either negative zeros don't exist
13804 on this platform or if negative zeros exist
13805 and tanh(-0.) == -0. */
13806 if (atan2(0., -1.) == atan2(-0., -1.) ||
13807 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13808 else exit(1);
13809}
13810
13811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013813 ac_cv_tanh_preserves_zero_sign=yes
13814else
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013819fi
13820
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013821fi
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13824$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013825if test "$ac_cv_tanh_preserves_zero_sign" = yes
13826then
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013829
13830fi
13831
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013832if test "$ac_cv_func_log1p" = yes
13833then
13834 # On some versions of AIX, log1p(-0.) returns 0. instead of
13835 # -0. See issue #9920.
13836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13837$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013838 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013839 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013840else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013841
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013842 if test "$cross_compiling" = yes; then :
13843 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013844else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013847
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013848 #include <math.h>
13849 #include <stdlib.h>
13850 int main() {
13851 /* Fail if the signs of log1p(-0.) and -0. can be
13852 distinguished. */
13853 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13854 return 0;
13855 else
13856 return 1;
13857 }
13858
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013859_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013860if ac_fn_c_try_run "$LINENO"; then :
13861 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013862else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013863 ac_cv_log1p_drops_zero_sign=yes
13864fi
13865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013867fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013868
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013869fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013870
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13872$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13873fi
13874if test "$ac_cv_log1p_drops_zero_sign" = yes
13875then
13876
13877$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13878
13879fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013880
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013881LIBS=$LIBS_SAVE
13882
Mark Dickinsona614f042009-11-28 12:48:43 +000013883# For multiprocessing module, check that sem_open
13884# actually works. For FreeBSD versions <= 7.2,
13885# the kernel module that provides POSIX semaphores
13886# isn't loaded by default, so an attempt to call
13887# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13889$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013890if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013894 ac_cv_posix_semaphores_enabled=yes
13895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013897/* end confdefs.h. */
13898
13899#include <unistd.h>
13900#include <fcntl.h>
13901#include <stdio.h>
13902#include <semaphore.h>
13903#include <sys/stat.h>
13904
13905int main(void) {
13906 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13907 if (a == SEM_FAILED) {
13908 perror("sem_open");
13909 return 1;
13910 }
13911 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013912 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013913 return 0;
13914}
13915
13916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013918 ac_cv_posix_semaphores_enabled=yes
13919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013924fi
13925
13926
Mark Dickinsona614f042009-11-28 12:48:43 +000013927fi
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13930$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013931if test $ac_cv_posix_semaphores_enabled = no
13932then
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013935
13936fi
13937
Mark Dickinson10683072009-04-18 21:18:19 +000013938# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13940$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013941if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013945 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013948/* end confdefs.h. */
13949
13950#include <unistd.h>
13951#include <fcntl.h>
13952#include <stdio.h>
13953#include <semaphore.h>
13954#include <sys/stat.h>
13955
13956int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013957 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013958 int count;
13959 int res;
13960 if(a==SEM_FAILED){
13961 perror("sem_open");
13962 return 1;
13963
13964 }
13965 res = sem_getvalue(a, &count);
13966 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013967 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013968 return res==-1 ? 1 : 0;
13969}
13970
Mark Dickinson10683072009-04-18 21:18:19 +000013971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013972if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013973 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013974else
Matthias Kloseb9621712010-04-24 17:59:49 +000013975 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013979fi
13980
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013982fi
13983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13985$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013986if test $ac_cv_broken_sem_getvalue = yes
13987then
13988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013990
13991fi
13992
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030013993ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
13994"
13995if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
13996 ac_have_decl=1
13997else
13998 ac_have_decl=0
13999fi
14000
14001cat >>confdefs.h <<_ACEOF
14002#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14003_ACEOF
14004ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14005"
14006if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14007 ac_have_decl=1
14008else
14009 ac_have_decl=0
14010fi
14011
14012cat >>confdefs.h <<_ACEOF
14013#define HAVE_DECL_RTLD_NOW $ac_have_decl
14014_ACEOF
14015ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14016"
14017if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14018 ac_have_decl=1
14019else
14020 ac_have_decl=0
14021fi
14022
14023cat >>confdefs.h <<_ACEOF
14024#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14025_ACEOF
14026ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14027"
14028if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14029 ac_have_decl=1
14030else
14031 ac_have_decl=0
14032fi
14033
14034cat >>confdefs.h <<_ACEOF
14035#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14036_ACEOF
14037ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14038"
14039if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14040 ac_have_decl=1
14041else
14042 ac_have_decl=0
14043fi
14044
14045cat >>confdefs.h <<_ACEOF
14046#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14047_ACEOF
14048ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14049"
14050if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14051 ac_have_decl=1
14052else
14053 ac_have_decl=0
14054fi
14055
14056cat >>confdefs.h <<_ACEOF
14057#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14058_ACEOF
14059ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14060"
14061if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14062 ac_have_decl=1
14063else
14064 ac_have_decl=0
14065fi
14066
14067cat >>confdefs.h <<_ACEOF
14068#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14069_ACEOF
14070
14071
Mark Dickinsonbd792642009-03-18 20:06:12 +000014072# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14074$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014075# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014076if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014077 enableval=$enable_big_digits; case $enable_big_digits in
14078yes)
14079 enable_big_digits=30 ;;
14080no)
14081 enable_big_digits=15 ;;
1408215|30)
14083 ;;
14084*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014085 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 +000014086esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14088$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014089
14090cat >>confdefs.h <<_ACEOF
14091#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14092_ACEOF
14093
14094
14095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14097$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014098fi
14099
14100
Guido van Rossumef2255b2000-03-10 22:30:29 +000014101# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014102ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014103if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
14105
Matthias Kloseb9621712010-04-24 17:59:49 +000014106$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014108 wchar_h="yes"
14109
Guido van Rossumef2255b2000-03-10 22:30:29 +000014110else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014112
14113fi
14114
Michael W. Hudson54241132001-12-07 15:38:26 +000014115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014117# determine wchar_t size
14118if test "$wchar_h" = yes
14119then
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14122# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14123# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14125$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014126if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014128else
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14130"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014131
Martin v. Löwis11437992002-04-12 09:54:03 +000014132else
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 if test "$ac_cv_type_wchar_t" = yes; then
14134 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014136as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014137See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138 else
14139 ac_cv_sizeof_wchar_t=0
14140 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014142
Martin v. Löwis11437992002-04-12 09:54:03 +000014143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14145$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146
14147
14148
Martin v. Löwis11437992002-04-12 09:54:03 +000014149cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014150#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014152
Michael W. Hudson54241132001-12-07 15:38:26 +000014153
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014154fi
14155
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14157$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014158have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014160/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014161
14162#include <tcl.h>
14163#if TCL_UTF_MAX != 6
14164# error "NOT UCS4_TCL"
14165#endif
14166int
14167main ()
14168{
14169
14170 ;
14171 return 0;
14172}
14173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014175
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014178
14179 have_ucs4_tcl=yes
14180
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14184$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014185
Skip Montanaro6dead952003-09-25 14:50:04 +000014186# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014187if test "$wchar_h" = yes
14188then
14189 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14191$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014192 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014194else
14195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014197 ac_cv_wchar_t_signed=yes
14198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014200/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014201
14202 #include <wchar.h>
14203 int main()
14204 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014205 /* Success: exit code 0 */
14206 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014207 }
14208
14209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014211 ac_cv_wchar_t_signed=yes
14212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014217fi
14218
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014219fi
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14222$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223fi
14224
Georg Brandl52d168a2008-01-07 18:10:24 +000014225# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014226if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014227 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014228then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014229 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014230
Matthias Kloseb9621712010-04-24 17:59:49 +000014231$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Georg Brandl52d168a2008-01-07 18:10:24 +000014233else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014234 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014235fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14237$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014238
14239# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14241$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014242if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 ac_cv_c_bigendian=unknown
14246 # See if we're dealing with a universal compiler.
14247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14248/* end confdefs.h. */
14249#ifndef __APPLE_CC__
14250 not a universal capable compiler
14251 #endif
14252 typedef int dummy;
14253
Skip Montanaro6dead952003-09-25 14:50:04 +000014254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014255if ac_fn_c_try_compile "$LINENO"; then :
14256
14257 # Check for potential -arch flags. It is not universal unless
14258 # there are at least two -arch flags with different values.
14259 ac_arch=
14260 ac_prev=
14261 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14262 if test -n "$ac_prev"; then
14263 case $ac_word in
14264 i?86 | x86_64 | ppc | ppc64)
14265 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14266 ac_arch=$ac_word
14267 else
14268 ac_cv_c_bigendian=universal
14269 break
14270 fi
14271 ;;
14272 esac
14273 ac_prev=
14274 elif test "x$ac_word" = "x-arch"; then
14275 ac_prev=arch
14276 fi
14277 done
14278fi
14279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280 if test $ac_cv_c_bigendian = unknown; then
14281 # See if sys/param.h defines the BYTE_ORDER macro.
14282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014283/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014284#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287int
14288main ()
14289{
Matthias Kloseb9621712010-04-24 17:59:49 +000014290#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14291 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14292 && LITTLE_ENDIAN)
14293 bogus endian macros
14294 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
14296 ;
14297 return 0;
14298}
14299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014300if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014301 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014303/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014304#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014306
Martin v. Löwis11437992002-04-12 09:54:03 +000014307int
14308main ()
14309{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014310#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 not big endian
14312 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014313
14314 ;
14315 return 0;
14316}
14317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014318if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014319 ac_cv_c_bigendian=yes
14320else
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014324fi
14325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14326 fi
14327 if test $ac_cv_c_bigendian = unknown; then
14328 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014330/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014331#include <limits.h>
14332
Martin v. Löwis11437992002-04-12 09:54:03 +000014333int
14334main ()
14335{
Matthias Kloseb9621712010-04-24 17:59:49 +000014336#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14337 bogus endian macros
14338 #endif
14339
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 ;
14341 return 0;
14342}
14343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014344if ac_fn_c_try_compile "$LINENO"; then :
14345 # It does; now see whether it defined to _BIG_ENDIAN or not.
14346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14347/* end confdefs.h. */
14348#include <limits.h>
14349
14350int
14351main ()
14352{
14353#ifndef _BIG_ENDIAN
14354 not big endian
14355 #endif
14356
14357 ;
14358 return 0;
14359}
14360_ACEOF
14361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14367fi
14368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14369 fi
14370 if test $ac_cv_c_bigendian = unknown; then
14371 # Compile a test program.
14372 if test "$cross_compiling" = yes; then :
14373 # Try to guess by grepping values from an object file.
14374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14375/* end confdefs.h. */
14376short int ascii_mm[] =
14377 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14378 short int ascii_ii[] =
14379 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14380 int use_ascii (int i) {
14381 return ascii_mm[i] + ascii_ii[i];
14382 }
14383 short int ebcdic_ii[] =
14384 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14385 short int ebcdic_mm[] =
14386 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14387 int use_ebcdic (int i) {
14388 return ebcdic_mm[i] + ebcdic_ii[i];
14389 }
14390 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392int
14393main ()
14394{
14395return use_ascii (foo) == use_ebcdic (foo);
14396 ;
14397 return 0;
14398}
14399_ACEOF
14400if ac_fn_c_try_compile "$LINENO"; then :
14401 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14402 ac_cv_c_bigendian=yes
14403 fi
14404 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14405 if test "$ac_cv_c_bigendian" = unknown; then
14406 ac_cv_c_bigendian=no
14407 else
14408 # finding both strings is unlikely to happen, but who knows?
14409 ac_cv_c_bigendian=unknown
14410 fi
14411 fi
14412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014414else
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014416/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014418int
14419main ()
14420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 /* Are we little or big endian? From Harbison&Steele. */
14423 union
14424 {
14425 long int l;
14426 char c[sizeof (long int)];
14427 } u;
14428 u.l = 1;
14429 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430
14431 ;
14432 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014433}
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014436 ac_cv_c_bigendian=no
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14441 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14447$as_echo "$ac_cv_c_bigendian" >&6; }
14448 case $ac_cv_c_bigendian in #(
14449 yes)
14450 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14451;; #(
14452 no)
14453 ;; #(
14454 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 ;; #(
14459 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014460 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014461 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014463
Michael W. Hudson54241132001-12-07 15:38:26 +000014464
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014465# ABI version string for Python extension modules. This appears between the
14466# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14467# from the following attributes which affect the ABI of this Python build (in
14468# this order):
14469#
14470# * The Python implementation (always 'cpython-' for us)
14471# * The major and minor version numbers
14472# * --with-pydebug (adds a 'd')
14473# * --with-pymalloc (adds a 'm')
14474# * --with-wide-unicode (adds a 'u')
14475#
14476# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014477# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14478# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014479
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14481$as_echo_n "checking ABIFLAGS... " >&6; }
14482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14483$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14485$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014486SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14488$as_echo "$SOABI" >&6; }
14489
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014490
14491case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014492 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014493 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14494 *)
14495 EXT_SUFFIX=${SHLIB_SUFFIX};;
14496esac
14497
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14499$as_echo_n "checking LDVERSION... " >&6; }
14500LDVERSION='$(VERSION)$(ABIFLAGS)'
14501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14502$as_echo "$LDVERSION" >&6; }
14503
doko@python.org87421192013-01-26 11:39:31 +010014504
doko@ubuntu.com55532312016-06-14 08:55:19 +020014505if test x$PLATFORM_TRIPLET = x; then
14506 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14507else
14508 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14509fi
doko@python.org87421192013-01-26 11:39:31 +010014510
14511
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014512# Check whether right shifting a negative integer extends the sign bit
14513# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14515$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014516if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014518else
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014521 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014524/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014525
14526int main()
14527{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014528 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014529}
14530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014532if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014533 ac_cv_rshift_extends_sign=yes
14534else
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14538 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014539fi
14540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541fi
14542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14544$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014545if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014546then
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014549
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014550fi
14551
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014552# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14554$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014555if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014557else
Martin v. Löwis11437992002-04-12 09:54:03 +000014558
Matthias Kloseb9621712010-04-24 17:59:49 +000014559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014560/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014561#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014562int
14563main ()
14564{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014565
14566 FILE *f = fopen("/dev/null", "r");
14567 flockfile(f);
14568 getc_unlocked(f);
14569 funlockfile(f);
14570
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 ;
14572 return 0;
14573}
14574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014576 ac_cv_have_getc_unlocked=yes
14577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_cv_have_getc_unlocked=no
14579fi
14580rm -f core conftest.err conftest.$ac_objext \
14581 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14585$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014586if test "$ac_cv_have_getc_unlocked" = yes
14587then
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014590
14591fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014592
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014593# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014594# save the value of LIBS so we don't actually link Python with readline
14595LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014596
Gregory P. Smith18820942008-09-07 06:24:49 +000014597# On some systems we need to link readline to a termcap compatible
14598# library. NOTE: Keep the precedence of listed libraries synchronised
14599# with setup.py.
14600py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14602$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014603for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014604 if test -z "$py_libtermcap"; then
14605 READLINE_LIBS="-lreadline"
14606 else
14607 READLINE_LIBS="-lreadline -l$py_libtermcap"
14608 fi
14609 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014611/* end confdefs.h. */
14612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613/* Override any GCC internal prototype to avoid an error.
14614 Use char because int might match the return type of a GCC
14615 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014616#ifdef __cplusplus
14617extern "C"
14618#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014619char readline ();
14620int
14621main ()
14622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014624 ;
14625 return 0;
14626}
14627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014628if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014629 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014631rm -f core conftest.err conftest.$ac_objext \
14632 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014633 if test $py_cv_lib_readline = yes; then
14634 break
14635 fi
14636done
14637# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14638#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014639if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14641$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14644$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014645
Matthias Kloseb9621712010-04-24 17:59:49 +000014646$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014647
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014648fi
14649
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014650# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14652$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014653if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014655else
14656 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014657LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014659/* end confdefs.h. */
14660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661/* Override any GCC internal prototype to avoid an error.
14662 Use char because int might match the return type of a GCC
14663 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014664#ifdef __cplusplus
14665extern "C"
14666#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014667char rl_callback_handler_install ();
14668int
14669main ()
14670{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014672 ;
14673 return 0;
14674}
14675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014676if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014677 ac_cv_lib_readline_rl_callback_handler_install=yes
14678else
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014681rm -f core conftest.err conftest.$ac_objext \
14682 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014683LIBS=$ac_check_lib_save_LIBS
14684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14686$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014687if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014688
Matthias Kloseb9621712010-04-24 17:59:49 +000014689$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014690
14691fi
14692
14693
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014694# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014696/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014697#include <readline/readline.h>
14698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014699if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014700 have_readline=yes
14701else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014702 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014703
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014704fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014705rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014706if test $have_readline = yes
14707then
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014709/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014710#include <readline/readline.h>
14711
14712_ACEOF
14713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014715
Matthias Kloseb9621712010-04-24 17:59:49 +000014716$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014717
14718fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014719rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014720
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014722/* end confdefs.h. */
14723#include <readline/readline.h>
14724
14725_ACEOF
14726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014730
14731fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014732rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014733
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014734fi
14735
Martin v. Löwis0daad592001-09-30 21:09:59 +000014736# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14738$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014739if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014741else
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014743LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747/* Override any GCC internal prototype to avoid an error.
14748 Use char because int might match the return type of a GCC
14749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014750#ifdef __cplusplus
14751extern "C"
14752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014753char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014754int
14755main ()
14756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 ;
14759 return 0;
14760}
14761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014763 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014767rm -f core conftest.err conftest.$ac_objext \
14768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014769LIBS=$ac_check_lib_save_LIBS
14770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14772$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014773if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014776
Martin v. Löwis0daad592001-09-30 21:09:59 +000014777fi
14778
Michael W. Hudson54241132001-12-07 15:38:26 +000014779
Thomas Wouters89d996e2007-09-08 17:39:28 +000014780# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14782$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014783if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014785else
14786 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014787LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014789/* end confdefs.h. */
14790
14791/* Override any GCC internal prototype to avoid an error.
14792 Use char because int might match the return type of a GCC
14793 builtin and then its argument prototype would still apply. */
14794#ifdef __cplusplus
14795extern "C"
14796#endif
14797char rl_completion_display_matches_hook ();
14798int
14799main ()
14800{
14801return rl_completion_display_matches_hook ();
14802 ;
14803 return 0;
14804}
14805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014806if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014807 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14808else
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014811rm -f core conftest.err conftest.$ac_objext \
14812 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014813LIBS=$ac_check_lib_save_LIBS
14814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14816$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014817if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014818
Matthias Kloseb9621712010-04-24 17:59:49 +000014819$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014820
14821fi
14822
14823
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014824# also in 4.0, but not in editline
14825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14826$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14827if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14828 $as_echo_n "(cached) " >&6
14829else
14830 ac_check_lib_save_LIBS=$LIBS
14831LIBS="-lreadline $READLINE_LIBS $LIBS"
14832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14833/* end confdefs.h. */
14834
14835/* Override any GCC internal prototype to avoid an error.
14836 Use char because int might match the return type of a GCC
14837 builtin and then its argument prototype would still apply. */
14838#ifdef __cplusplus
14839extern "C"
14840#endif
14841char rl_resize_terminal ();
14842int
14843main ()
14844{
14845return rl_resize_terminal ();
14846 ;
14847 return 0;
14848}
14849_ACEOF
14850if ac_fn_c_try_link "$LINENO"; then :
14851 ac_cv_lib_readline_rl_resize_terminal=yes
14852else
14853 ac_cv_lib_readline_rl_resize_terminal=no
14854fi
14855rm -f core conftest.err conftest.$ac_objext \
14856 conftest$ac_exeext conftest.$ac_ext
14857LIBS=$ac_check_lib_save_LIBS
14858fi
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14860$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14861if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14862
14863$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14864
14865fi
14866
14867
Martin v. Löwis0daad592001-09-30 21:09:59 +000014868# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14870$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014871if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014875LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879/* Override any GCC internal prototype to avoid an error.
14880 Use char because int might match the return type of a GCC
14881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014882#ifdef __cplusplus
14883extern "C"
14884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014885char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014886int
14887main ()
14888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 ;
14891 return 0;
14892}
14893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014896else
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014899rm -f core conftest.err conftest.$ac_objext \
14900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014901LIBS=$ac_check_lib_save_LIBS
14902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14904$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014905if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014908
Guido van Rossum353ae582001-07-10 16:45:32 +000014909fi
14910
Jack Jansendd19cf82001-12-06 22:36:17 +000014911
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014912# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014914/* end confdefs.h. */
14915#include <readline/readline.h>
14916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014917if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014918 have_readline=yes
14919else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014920 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014921
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014922fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014923rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924if test $have_readline = yes
14925then
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014927/* end confdefs.h. */
14928#include <readline/readline.h>
14929
14930_ACEOF
14931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014933
Matthias Kloseb9621712010-04-24 17:59:49 +000014934$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014935
14936fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014937rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014938
14939fi
14940
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14942$as_echo_n "checking for append_history in -lreadline... " >&6; }
14943if ${ac_cv_lib_readline_append_history+:} false; then :
14944 $as_echo_n "(cached) " >&6
14945else
14946 ac_check_lib_save_LIBS=$LIBS
14947LIBS="-lreadline $READLINE_LIBS $LIBS"
14948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949/* end confdefs.h. */
14950
14951/* Override any GCC internal prototype to avoid an error.
14952 Use char because int might match the return type of a GCC
14953 builtin and then its argument prototype would still apply. */
14954#ifdef __cplusplus
14955extern "C"
14956#endif
14957char append_history ();
14958int
14959main ()
14960{
14961return append_history ();
14962 ;
14963 return 0;
14964}
14965_ACEOF
14966if ac_fn_c_try_link "$LINENO"; then :
14967 ac_cv_lib_readline_append_history=yes
14968else
14969 ac_cv_lib_readline_append_history=no
14970fi
14971rm -f core conftest.err conftest.$ac_objext \
14972 conftest$ac_exeext conftest.$ac_ext
14973LIBS=$ac_check_lib_save_LIBS
14974fi
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14976$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14977if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14978
14979$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14980
14981fi
14982
14983
Martin v. Löwis82bca632006-02-10 20:49:30 +000014984# End of readline checks: restore LIBS
14985LIBS=$LIBS_no_readline
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14988$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014989if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014991else
Martin v. Löwis11437992002-04-12 09:54:03 +000014992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014994 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014995else
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014998
14999int main()
15000{
15001 int val1 = nice(1);
15002 if (val1 != -1 && val1 == nice(2))
15003 exit(0);
15004 exit(1);
15005}
15006
Martin v. Löwis11437992002-04-12 09:54:03 +000015007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015008if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015009 ac_cv_broken_nice=yes
15010else
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015015fi
15016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017fi
15018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15020$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015021if test "$ac_cv_broken_nice" = yes
15022then
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015025
15026fi
15027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15029$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015030if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015032else
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015034 ac_cv_broken_poll=no
15035else
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015037/* end confdefs.h. */
15038
15039#include <poll.h>
15040
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015041int main()
15042{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015043 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015044 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015045
15046 close (42);
15047
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015048 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015049 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015050 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015051 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015052 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015053 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015054 return 1;
15055}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015056
15057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015058if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015059 ac_cv_broken_poll=yes
15060else
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15064 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015067fi
15068
Matthias Kloseb9621712010-04-24 17:59:49 +000015069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15070$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015071if test "$ac_cv_broken_poll" = yes
15072then
15073
Matthias Kloseb9621712010-04-24 17:59:49 +000015074$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015075
15076fi
15077
Brett Cannon43802422005-02-10 20:48:03 +000015078# 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 +000015079# (which is not required by ISO C or UNIX spec) and/or if we support
15080# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015081ac_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 +000015082#include <$ac_cv_struct_tm>
15083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084"
Victor Stinnere0be4232011-10-25 13:06:09 +020015085if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015086
15087cat >>confdefs.h <<_ACEOF
15088#define HAVE_STRUCT_TM_TM_ZONE 1
15089_ACEOF
15090
15091
15092fi
15093
15094if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015097
15098else
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15100"
Victor Stinnere0be4232011-10-25 13:06:09 +020015101if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105fi
15106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109_ACEOF
15110
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15112$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015113if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115else
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015117/* end confdefs.h. */
15118#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119#if !HAVE_DECL_TZNAME
15120extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015121#endif
15122
15123int
15124main ()
15125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015127 ;
15128 return 0;
15129}
15130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015131if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015132 ac_cv_var_tzname=yes
15133else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015136rm -f core conftest.err conftest.$ac_objext \
15137 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15140$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015141 if test $ac_cv_var_tzname = yes; then
15142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015144
15145 fi
15146fi
15147
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015148
Martin v. Löwis1d459062005-03-14 21:23:33 +000015149# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15151$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015152if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015153 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015154else
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015157 ac_cv_working_tzset=no
15158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015160/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015161
15162#include <stdlib.h>
15163#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015164#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015165
15166#if HAVE_TZNAME
15167extern char *tzname[];
15168#endif
15169
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015170int main()
15171{
Brett Cannon18367812003-09-19 00:59:16 +000015172 /* Note that we need to ensure that not only does tzset(3)
15173 do 'something' with localtime, but it works as documented
15174 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015175 This includes making sure that tzname is set properly if
15176 tm->tm_zone does not exist since it is the alternative way
15177 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015178
15179 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015180 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015181 */
15182
Martin v. Löwis1d459062005-03-14 21:23:33 +000015183 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015184 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15185
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015186 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015187 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015188 if (localtime(&groundhogday)->tm_hour != 0)
15189 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015190#if HAVE_TZNAME
15191 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15192 if (strcmp(tzname[0], "UTC") ||
15193 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15194 exit(1);
15195#endif
Brett Cannon18367812003-09-19 00:59:16 +000015196
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015197 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015198 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015199 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015200 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015201#if HAVE_TZNAME
15202 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15203 exit(1);
15204#endif
Brett Cannon18367812003-09-19 00:59:16 +000015205
15206 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15207 tzset();
15208 if (localtime(&groundhogday)->tm_hour != 11)
15209 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015210#if HAVE_TZNAME
15211 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15212 exit(1);
15213#endif
15214
15215#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015216 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15217 exit(1);
15218 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15219 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015220#endif
Brett Cannon18367812003-09-19 00:59:16 +000015221
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015222 exit(0);
15223}
15224
15225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015226if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015227 ac_cv_working_tzset=yes
15228else
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015233fi
15234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235fi
15236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15238$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015239if test "$ac_cv_working_tzset" = yes
15240then
15241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015243
15244fi
15245
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015246# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15248$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015249if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015251else
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015254#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015255int
15256main ()
15257{
15258
15259struct stat st;
15260st.st_mtim.tv_nsec = 1;
15261
15262 ;
15263 return 0;
15264}
15265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015267 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015268else
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15272fi
15273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15275$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015276if test "$ac_cv_stat_tv_nsec" = yes
15277then
15278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015280
15281fi
15282
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015283# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15285$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015286if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015288else
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015290/* end confdefs.h. */
15291#include <sys/stat.h>
15292int
15293main ()
15294{
15295
15296struct stat st;
15297st.st_mtimespec.tv_nsec = 1;
15298
15299 ;
15300 return 0;
15301}
15302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015304 ac_cv_stat_tv_nsec2=yes
15305else
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15309fi
15310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15312$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015313if test "$ac_cv_stat_tv_nsec2" = yes
15314then
15315
Matthias Kloseb9621712010-04-24 17:59:49 +000015316$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015317
15318fi
15319
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015320# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015321ac_save_cppflags="$CPPFLAGS"
15322CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015323
15324for ac_header in curses.h ncurses.h
15325do :
15326 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15327ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15328if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15329 cat >>confdefs.h <<_ACEOF
15330#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15331_ACEOF
15332
15333fi
15334
15335done
15336
15337
15338# On Solaris, term.h requires curses.h
15339for ac_header in term.h
15340do :
15341 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15342#ifdef HAVE_CURSES_H
15343#include <curses.h>
15344#endif
15345
15346"
15347if test "x$ac_cv_header_term_h" = xyes; then :
15348 cat >>confdefs.h <<_ACEOF
15349#define HAVE_TERM_H 1
15350_ACEOF
15351
15352fi
15353
15354done
15355
15356
Jack Jansen666b1e72001-10-31 12:11:48 +000015357# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15359$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015360if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015362else
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015364/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015365#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015366int
15367main ()
15368{
Jack Jansen666b1e72001-10-31 12:11:48 +000015369
15370 int rtn;
15371 rtn = mvwdelch(0,0,0);
15372
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 ;
15374 return 0;
15375}
15376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015377if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015378 ac_cv_mvwdelch_is_expression=yes
15379else
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15383fi
15384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15386$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015387
15388if test "$ac_cv_mvwdelch_is_expression" = yes
15389then
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
Matthias Kloseb9621712010-04-24 17:59:49 +000015391$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015392
15393fi
15394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15396$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015397if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015399else
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015401/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015402#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015403int
15404main ()
15405{
Jack Jansen666b1e72001-10-31 12:11:48 +000015406
15407 WINDOW *w;
15408 w->_flags = 0;
15409
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015414if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015415 ac_cv_window_has_flags=yes
15416else
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15420fi
15421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15423$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015424
Jack Jansen666b1e72001-10-31 12:11:48 +000015425
15426if test "$ac_cv_window_has_flags" = yes
15427then
Martin v. Löwis11437992002-04-12 09:54:03 +000015428
Matthias Kloseb9621712010-04-24 17:59:49 +000015429$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015430
15431fi
15432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15434$as_echo_n "checking for is_term_resized... " >&6; }
15435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015436/* end confdefs.h. */
15437#include <curses.h>
15438int
15439main ()
15440{
15441void *x=is_term_resized
15442 ;
15443 return 0;
15444}
15445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015447
Matthias Kloseb9621712010-04-24 17:59:49 +000015448$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015449
Matthias Kloseb159a552010-04-25 21:00:44 +000015450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015451$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015452else
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15454$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015455
15456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15460$as_echo_n "checking for resize_term... " >&6; }
15461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015462/* end confdefs.h. */
15463#include <curses.h>
15464int
15465main ()
15466{
15467void *x=resize_term
15468 ;
15469 return 0;
15470}
15471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015472if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015475
Matthias Kloseb159a552010-04-25 21:00:44 +000015476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015477$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015478else
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15480$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015481
15482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15486$as_echo_n "checking for resizeterm... " >&6; }
15487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015488/* end confdefs.h. */
15489#include <curses.h>
15490int
15491main ()
15492{
15493void *x=resizeterm
15494 ;
15495 return 0;
15496}
15497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015498if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015499
Matthias Kloseb9621712010-04-24 17:59:49 +000015500$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015501
Matthias Kloseb159a552010-04-25 21:00:44 +000015502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15506$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015507
15508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015510# last curses configure check
15511CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15514$as_echo "$as_me: checking for device files" >&6;}
15515
15516if test "x$cross_compiling" = xyes; then
15517 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15519$as_echo_n "checking for /dev/ptmx... " >&6; }
15520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15521$as_echo "not set" >&6; }
15522 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15523 fi
15524 if test "${ac_cv_file__dev_ptc+set}" != set; then
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15526$as_echo_n "checking for /dev/ptc... " >&6; }
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15528$as_echo "not set" >&6; }
15529 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15530 fi
15531fi
15532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15534$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015535if ${ac_cv_file__dev_ptmx+:} false; then :
15536 $as_echo_n "(cached) " >&6
15537else
15538 test "$cross_compiling" = yes &&
15539 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15540if test -r "/dev/ptmx"; then
15541 ac_cv_file__dev_ptmx=yes
15542else
15543 ac_cv_file__dev_ptmx=no
15544fi
15545fi
15546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15547$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15548if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015549
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015550fi
15551
15552if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015555
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15558$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015559if ${ac_cv_file__dev_ptc+:} false; then :
15560 $as_echo_n "(cached) " >&6
15561else
15562 test "$cross_compiling" = yes &&
15563 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15564if test -r "/dev/ptc"; then
15565 ac_cv_file__dev_ptc=yes
15566else
15567 ac_cv_file__dev_ptc=no
15568fi
15569fi
15570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15571$as_echo "$ac_cv_file__dev_ptc" >&6; }
15572if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015573
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015574fi
15575
15576if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015579
Neal Norwitz865400f2003-03-21 01:42:58 +000015580fi
15581
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015583$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015584if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015585 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015586else
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015588 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015589if test x$GCC = xyes; then
15590save_CFLAGS=$CFLAGS
15591CFLAGS="$CFLAGS -Werror -Wformat"
15592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015593/* end confdefs.h. */
15594
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015595#include <stdio.h>
15596#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015597
15598int
15599main ()
15600{
15601
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015602char *buffer;
15603sprintf(buffer, "%lld", (long long)123);
15604sprintf(buffer, "%lld", (long long)-123);
15605sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015606
15607 ;
15608 return 0;
15609}
15610_ACEOF
15611if ac_fn_c_try_compile "$LINENO"; then :
15612 ac_cv_have_long_long_format=yes
15613
15614fi
15615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015616CFLAGS=$save_CFLAGS
15617fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015618else
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015620/* end confdefs.h. */
15621
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015622#include <stdio.h>
15623#include <stddef.h>
15624#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015625
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015626#ifdef HAVE_SYS_TYPES_H
15627#include <sys/types.h>
15628#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015629
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015630int main()
15631{
15632char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015633
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015634if (sprintf(buffer, "%lld", (long long)123) < 0)
15635return 1;
15636if (strcmp(buffer, "123"))
15637return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015638
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015639if (sprintf(buffer, "%lld", (long long)-123) < 0)
15640return 1;
15641if (strcmp(buffer, "-123"))
15642return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015643
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015644if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15645return 1;
15646if (strcmp(buffer, "123"))
15647return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015648
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015649return 0;
15650}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015651
15652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015653if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015654 ac_cv_have_long_long_format=yes
15655else
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015660fi
15661
15662
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015663fi
15664
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015666$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015667
Mark Dickinson89d7d412009-12-31 20:50:59 +000015668if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015669then
15670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015672
15673fi
15674
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015675if test $ac_sys_system = Darwin
15676then
15677 LIBS="$LIBS -framework CoreFoundation"
15678fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15681$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015682if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015684else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015686 ac_cv_have_size_t_format="cross -- assuming yes"
15687
Thomas Wouters477c8d52006-05-27 19:21:47 +000015688else
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015690/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015691
Thomas Wouters477c8d52006-05-27 19:21:47 +000015692#include <stdio.h>
15693#include <stddef.h>
15694#include <string.h>
15695
Christian Heimes2c181612007-12-17 20:04:13 +000015696#ifdef HAVE_SYS_TYPES_H
15697#include <sys/types.h>
15698#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015699
15700#ifdef HAVE_SSIZE_T
15701typedef ssize_t Py_ssize_t;
15702#elif SIZEOF_VOID_P == SIZEOF_LONG
15703typedef long Py_ssize_t;
15704#else
15705typedef int Py_ssize_t;
15706#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015707
Christian Heimes2c181612007-12-17 20:04:13 +000015708int main()
15709{
15710 char buffer[256];
15711
Thomas Wouters477c8d52006-05-27 19:21:47 +000015712 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15713 return 1;
15714
Thomas Wouters89f507f2006-12-13 04:49:30 +000015715 if (strcmp(buffer, "123"))
15716 return 1;
15717
15718 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15719 return 1;
15720
15721 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015722 return 1;
15723
15724 return 0;
15725}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015726
Thomas Wouters477c8d52006-05-27 19:21:47 +000015727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015729 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015735fi
15736
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15739$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015740if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015743
15744fi
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015747#ifdef HAVE_SYS_TYPES_H
15748#include <sys/types.h>
15749#endif
15750#ifdef HAVE_SYS_SOCKET_H
15751#include <sys/socket.h>
15752#endif
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754"
Victor Stinnere0be4232011-10-25 13:06:09 +020015755if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015760
15761fi
15762
Michael W. Hudson54241132001-12-07 15:38:26 +000015763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15765$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015766if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015770 ac_cv_broken_mbstowcs=no
15771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015773/* end confdefs.h. */
15774
Stefan Krah19c21392012-11-22 23:47:32 +010015775#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015776#include<stdlib.h>
15777int main() {
15778 size_t len = -1;
15779 const char *str = "text";
15780 len = mbstowcs(NULL, str, 0);
15781 return (len != 4);
15782}
15783
15784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015785if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015786 ac_cv_broken_mbstowcs=no
15787else
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015792fi
15793
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015794fi
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15797$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015798if test "$ac_cv_broken_mbstowcs" = yes
15799then
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015802
15803fi
15804
Antoine Pitroub52ec782009-01-25 16:34:23 +000015805# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15807$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015808
15809# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015810if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015811 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015812if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015813then
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15818$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015819fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015820if test "$withval" = no
15821then
15822
15823$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15826$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015827fi
15828
Antoine Pitrou042b1282010-08-13 21:15:58 +000015829else
15830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15831$as_echo "no value specified" >&6; }
15832fi
15833
Antoine Pitroub52ec782009-01-25 16:34:23 +000015834
Matthias Kloseb17289e2012-03-15 19:51:34 +010015835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15836$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15837if ${ac_cv_computed_gotos+:} false; then :
15838 $as_echo_n "(cached) " >&6
15839else
15840 if test "$cross_compiling" = yes; then :
15841 if test "${with_computed_gotos+set}" = set; then
15842 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15843 else
15844 ac_cv_computed_gotos=no
15845 fi
15846else
15847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15848/* end confdefs.h. */
15849
15850int main(int argc, char **argv)
15851{
15852 static void *targets[1] = { &&LABEL1 };
15853 goto LABEL2;
15854LABEL1:
15855 return 0;
15856LABEL2:
15857 goto *targets[0];
15858 return 1;
15859}
15860
15861_ACEOF
15862if ac_fn_c_try_run "$LINENO"; then :
15863 ac_cv_computed_gotos=yes
15864else
15865 ac_cv_computed_gotos=no
15866fi
15867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15868 conftest.$ac_objext conftest.beam conftest.$ac_ext
15869fi
15870
15871fi
15872
15873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15874$as_echo "$ac_cv_computed_gotos" >&6; }
15875case "$ac_cv_computed_gotos" in yes*)
15876
15877$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15878
15879esac
15880
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015881case $ac_sys_system in
15882AIX*)
15883
15884$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15885 ;;
15886esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015887
Michael W. Hudson54241132001-12-07 15:38:26 +000015888
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015889
15890
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015891for h in `(cd $srcdir;echo Python/thread_*.h)`
15892do
15893 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15894done
15895
Michael W. Hudson54241132001-12-07 15:38:26 +000015896
Ned Deily0db50cf2014-07-25 12:41:31 -070015897SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15899$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015900for dir in $SRCDIRS; do
15901 if test ! -d $dir; then
15902 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015903 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015904done
Matthias Kloseb9621712010-04-24 17:59:49 +000015905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15906$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015907
Stefan Krah1919b7e2012-03-21 18:25:23 +010015908# Availability of -O2:
15909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15910$as_echo_n "checking for -O2... " >&6; }
15911saved_cflags="$CFLAGS"
15912CFLAGS="-O2"
15913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914/* end confdefs.h. */
15915
15916int
15917main ()
15918{
15919
15920
15921 ;
15922 return 0;
15923}
15924_ACEOF
15925if ac_fn_c_try_compile "$LINENO"; then :
15926 have_O2=yes
15927else
15928 have_O2=no
15929fi
15930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15932$as_echo "$have_O2" >&6; }
15933CFLAGS="$saved_cflags"
15934
15935# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15936# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15938$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15939saved_cflags="$CFLAGS"
15940CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15941if test "$have_O2" = no; then
15942 CFLAGS=""
15943fi
15944if test "$cross_compiling" = yes; then :
15945 have_glibc_memmove_bug=undefined
15946else
15947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15948/* end confdefs.h. */
15949
15950#include <stdio.h>
15951#include <stdlib.h>
15952#include <string.h>
15953void foo(void *p, void *q) { memmove(p, q, 19); }
15954int main() {
15955 char a[32] = "123456789000000000";
15956 foo(&a[9], a);
15957 if (strcmp(a, "123456789123456789000000000") != 0)
15958 return 1;
15959 foo(a, &a[9]);
15960 if (strcmp(a, "123456789000000000") != 0)
15961 return 1;
15962 return 0;
15963}
15964
15965_ACEOF
15966if ac_fn_c_try_run "$LINENO"; then :
15967 have_glibc_memmove_bug=no
15968else
15969 have_glibc_memmove_bug=yes
15970fi
15971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15972 conftest.$ac_objext conftest.beam conftest.$ac_ext
15973fi
15974
15975CFLAGS="$saved_cflags"
15976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15977$as_echo "$have_glibc_memmove_bug" >&6; }
15978if test "$have_glibc_memmove_bug" = yes; then
15979
15980$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15981
15982fi
15983
15984if test "$have_gcc_asm_for_x87" = yes; then
15985 # Some versions of gcc miscompile inline asm:
15986 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15987 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15988 case $CC in
15989 *gcc*)
15990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15991$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15992 saved_cflags="$CFLAGS"
15993 CFLAGS="-O2"
15994 if test "$cross_compiling" = yes; then :
15995 have_ipa_pure_const_bug=undefined
15996else
15997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998/* end confdefs.h. */
15999
16000 __attribute__((noinline)) int
16001 foo(int *p) {
16002 int r;
16003 asm ( "movl \$6, (%1)\n\t"
16004 "xorl %0, %0\n\t"
16005 : "=r" (r) : "r" (p) : "memory"
16006 );
16007 return r;
16008 }
16009 int main() {
16010 int p = 8;
16011 if ((foo(&p) ? : p) != 6)
16012 return 1;
16013 return 0;
16014 }
16015
16016_ACEOF
16017if ac_fn_c_try_run "$LINENO"; then :
16018 have_ipa_pure_const_bug=no
16019else
16020 have_ipa_pure_const_bug=yes
16021fi
16022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16023 conftest.$ac_objext conftest.beam conftest.$ac_ext
16024fi
16025
16026 CFLAGS="$saved_cflags"
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16028$as_echo "$have_ipa_pure_const_bug" >&6; }
16029 if test "$have_ipa_pure_const_bug" = yes; then
16030
16031$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16032
16033 fi
16034 ;;
16035 esac
16036fi
16037
Victor Stinner4f5366e2015-01-09 02:13:19 +010016038# Check for stdatomic.h
16039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16040$as_echo_n "checking for stdatomic.h... " >&6; }
16041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042/* end confdefs.h. */
16043
16044
16045 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016046 atomic_int value = ATOMIC_VAR_INIT(1);
16047 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016048 int main() {
16049 int loaded_value = atomic_load(&value);
16050 return 0;
16051 }
16052
16053
16054_ACEOF
16055if ac_fn_c_try_link "$LINENO"; then :
16056 have_stdatomic_h=yes
16057else
16058 have_stdatomic_h=no
16059fi
16060rm -f core conftest.err conftest.$ac_objext \
16061 conftest$ac_exeext conftest.$ac_ext
16062
16063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16064$as_echo "$have_stdatomic_h" >&6; }
16065
16066if test "$have_stdatomic_h" = yes; then
16067
16068$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16069
16070fi
16071
16072# Check for GCC >= 4.7 __atomic builtins
16073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16074$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16076/* end confdefs.h. */
16077
16078
16079 volatile int val = 1;
16080 int main() {
16081 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16082 return 0;
16083 }
16084
16085
16086_ACEOF
16087if ac_fn_c_try_link "$LINENO"; then :
16088 have_builtin_atomic=yes
16089else
16090 have_builtin_atomic=no
16091fi
16092rm -f core conftest.err conftest.$ac_objext \
16093 conftest$ac_exeext conftest.$ac_ext
16094
16095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16096$as_echo "$have_builtin_atomic" >&6; }
16097
16098if test "$have_builtin_atomic" = yes; then
16099
16100$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16101
16102fi
16103
Ned Deily322f5ba2013-11-21 23:01:59 -080016104# ensurepip option
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16106$as_echo_n "checking for ensurepip... " >&6; }
16107
16108# Check whether --with-ensurepip was given.
16109if test "${with_ensurepip+set}" = set; then :
16110 withval=$with_ensurepip;
16111else
16112 with_ensurepip=upgrade
16113fi
16114
16115case $with_ensurepip in #(
16116 yes|upgrade) :
16117 ENSUREPIP=upgrade ;; #(
16118 install) :
16119 ENSUREPIP=install ;; #(
16120 no) :
16121 ENSUREPIP=no ;; #(
16122 *) :
16123 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16124esac
16125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16126$as_echo "$ENSUREPIP" >&6; }
16127
16128
Victor Stinner35a97c02015-03-08 02:59:09 +010016129# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16131$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16133/* end confdefs.h. */
16134
16135
16136 #include <dirent.h>
16137
16138 int main() {
16139 struct dirent entry;
16140 return entry.d_type == DT_UNKNOWN;
16141 }
16142
16143
16144_ACEOF
16145if ac_fn_c_try_link "$LINENO"; then :
16146 have_dirent_d_type=yes
16147else
16148 have_dirent_d_type=no
16149fi
16150rm -f core conftest.err conftest.$ac_objext \
16151 conftest$ac_exeext conftest.$ac_ext
16152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16153$as_echo "$have_dirent_d_type" >&6; }
16154
16155if test "$have_dirent_d_type" = yes; then
16156
16157$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16158
16159fi
16160
Victor Stinner9eb57c52015-03-19 22:21:49 +010016161# check if the Linux getrandom() syscall is available
16162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16163$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16165/* end confdefs.h. */
16166
16167
Victor Stinner1b80b242016-04-12 22:34:58 +020016168 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016169 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016170 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016171
16172 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016173 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016174 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016175 const int flags = GRND_NONBLOCK;
16176 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016177 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016178 return 0;
16179 }
16180
16181
16182_ACEOF
16183if ac_fn_c_try_link "$LINENO"; then :
16184 have_getrandom_syscall=yes
16185else
16186 have_getrandom_syscall=no
16187fi
16188rm -f core conftest.err conftest.$ac_objext \
16189 conftest$ac_exeext conftest.$ac_ext
16190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16191$as_echo "$have_getrandom_syscall" >&6; }
16192
16193if test "$have_getrandom_syscall" = yes; then
16194
16195$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16196
16197fi
16198
Victor Stinner3abf44e2015-09-18 15:38:37 +020016199# check if the getrandom() function is available
16200# the test was written for the Solaris function of <sys/random.h>
16201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16202$as_echo_n "checking for the getrandom() function... " >&6; }
16203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16204/* end confdefs.h. */
16205
16206
16207 #include <sys/random.h>
16208
16209 int main() {
16210 char buffer[1];
16211 const size_t buflen = sizeof(buffer);
16212 const int flags = 0;
16213 /* ignore the result, Python checks for ENOSYS at runtime */
16214 (void)getrandom(buffer, buflen, flags);
16215 return 0;
16216 }
16217
16218
16219_ACEOF
16220if ac_fn_c_try_link "$LINENO"; then :
16221 have_getrandom=yes
16222else
16223 have_getrandom=no
16224fi
16225rm -f core conftest.err conftest.$ac_objext \
16226 conftest$ac_exeext conftest.$ac_ext
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16228$as_echo "$have_getrandom" >&6; }
16229
16230if test "$have_getrandom" = yes; then
16231
16232$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16233
16234fi
16235
Guido van Rossum627b2d71993-12-24 10:39:16 +000016236# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016237ac_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 +000016238
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016239ac_config_files="$ac_config_files Modules/ld_so_aix"
16240
Martin v. Löwis11437992002-04-12 09:54:03 +000016241cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016242# This file is a shell script that caches the results of configure
16243# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016244# scripts and configure runs, see configure's option --config-cache.
16245# It is not useful on other systems. If it contains results you don't
16246# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016247#
Martin v. Löwis11437992002-04-12 09:54:03 +000016248# config.status only pays attention to the cache file if you give it
16249# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016250#
Skip Montanaro6dead952003-09-25 14:50:04 +000016251# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016252# loading this file, other *unset* `ac_cv_foo' will be assigned the
16253# following values.
16254
16255_ACEOF
16256
Guido van Rossumf78abae1997-01-21 22:02:36 +000016257# The following way of writing the cache mishandles newlines in values,
16258# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016260# Ultrix sh set writes to stderr and can't be redirected directly,
16261# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262(
16263 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16264 eval ac_val=\$$ac_var
16265 case $ac_val in #(
16266 *${as_nl}*)
16267 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16269$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016270 esac
16271 case $ac_var in #(
16272 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016273 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16274 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275 esac ;;
16276 esac
16277 done
16278
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16281 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016282 # `set' does not quote correctly, so add quotes: double-quote
16283 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 "s/'/'\\\\''/g;
16286 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 *)
16289 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 esac |
16293 sort
16294) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16300 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16302 :end' >>confcache
16303if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16304 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016305 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16307$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016308 if test ! -f "$cache_file" || test -h "$cache_file"; then
16309 cat confcache >"$cache_file"
16310 else
16311 case $cache_file in #(
16312 */* | ?:*)
16313 mv -f confcache "$cache_file"$$ &&
16314 mv -f "$cache_file"$$ "$cache_file" ;; #(
16315 *)
16316 mv -f confcache "$cache_file" ;;
16317 esac
16318 fi
16319 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016320 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016321 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16322$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016324fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016325rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016326
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016327test "x$prefix" = xNONE && prefix=$ac_default_prefix
16328# Let make expand exec_prefix.
16329test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016331DEFS=-DHAVE_CONFIG_H
16332
Skip Montanaro6dead952003-09-25 14:50:04 +000016333ac_libobjs=
16334ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016335U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016336for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16337 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016339 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16341 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016342 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16343 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016344done
16345LIBOBJS=$ac_libobjs
16346
16347LTLIBOBJS=$ac_ltlibobjs
16348
16349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350
Matthias Kloseb9621712010-04-24 17:59:49 +000016351
Victor Stinnere0be4232011-10-25 13:06:09 +020016352: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016353ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016354ac_clean_files_save=$ac_clean_files
16355ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016356{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16357$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16358as_write_fail=0
16359cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016360#! $SHELL
16361# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016362# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016363# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016364# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016365
Martin v. Löwis11437992002-04-12 09:54:03 +000016366debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016367ac_cs_recheck=false
16368ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016369
Matthias Kloseb9621712010-04-24 17:59:49 +000016370SHELL=\${CONFIG_SHELL-$SHELL}
16371export SHELL
16372_ASEOF
16373cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16374## -------------------- ##
16375## M4sh Initialization. ##
16376## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378# Be more Bourne compatible
16379DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016380if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 emulate sh
16382 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016383 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016384 # is contrary to our usage. Disable this feature.
16385 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016387else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 case `(set -o) 2>/dev/null` in #(
16389 *posix*) :
16390 set -o posix ;; #(
16391 *) :
16392 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016393esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016394fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016395
16396
Matthias Kloseb9621712010-04-24 17:59:49 +000016397as_nl='
16398'
16399export as_nl
16400# Printing a long string crashes Solaris 7 /usr/bin/printf.
16401as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16402as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16403as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16404# Prefer a ksh shell builtin over an external printf program on Solaris,
16405# but without wasting forks for bash or zsh.
16406if test -z "$BASH_VERSION$ZSH_VERSION" \
16407 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16408 as_echo='print -r --'
16409 as_echo_n='print -rn --'
16410elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16411 as_echo='printf %s\n'
16412 as_echo_n='printf %s'
16413else
16414 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16415 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16416 as_echo_n='/usr/ucb/echo -n'
16417 else
16418 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16419 as_echo_n_body='eval
16420 arg=$1;
16421 case $arg in #(
16422 *"$as_nl"*)
16423 expr "X$arg" : "X\\(.*\\)$as_nl";
16424 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16425 esac;
16426 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16427 '
16428 export as_echo_n_body
16429 as_echo_n='sh -c $as_echo_n_body as_echo'
16430 fi
16431 export as_echo_body
16432 as_echo='sh -c $as_echo_body as_echo'
16433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016434
16435# The user is always right.
16436if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016437 PATH_SEPARATOR=:
16438 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16439 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16440 PATH_SEPARATOR=';'
16441 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444
16445# IFS
16446# We need space, tab and new line, in precisely that order. Quoting is
16447# there to prevent editors from complaining about space-tab.
16448# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16449# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450IFS=" "" $as_nl"
16451
16452# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016453as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016454case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455 *[\\/]* ) as_myself=$0 ;;
16456 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016457for as_dir in $PATH
16458do
16459 IFS=$as_save_IFS
16460 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016461 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16462 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016465 ;;
16466esac
16467# We did not find ourselves, most probably we were run as `sh COMMAND'
16468# in which case we are not to be found in the path.
16469if test "x$as_myself" = x; then
16470 as_myself=$0
16471fi
16472if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016473 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16474 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475fi
16476
Matthias Kloseb9621712010-04-24 17:59:49 +000016477# Unset variables that we do not need and which cause bugs (e.g. in
16478# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16479# suppresses any "Segmentation fault" message there. '((' could
16480# trigger a bug in pdksh 5.2.14.
16481for as_var in BASH_ENV ENV MAIL MAILPATH
16482do eval test x\${$as_var+set} = xset \
16483 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484done
16485PS1='$ '
16486PS2='> '
16487PS4='+ '
16488
16489# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016490LC_ALL=C
16491export LC_ALL
16492LANGUAGE=C
16493export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494
Matthias Kloseb9621712010-04-24 17:59:49 +000016495# CDPATH.
16496(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16497
16498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016499# as_fn_error STATUS ERROR [LINENO LOG_FD]
16500# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016501# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16502# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016503# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016504as_fn_error ()
16505{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016506 as_status=$1; test $as_status -eq 0 && as_status=1
16507 if test "$4"; then
16508 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16509 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016510 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016511 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 as_fn_exit $as_status
16513} # as_fn_error
16514
16515
16516# as_fn_set_status STATUS
16517# -----------------------
16518# Set $? to STATUS, without forking.
16519as_fn_set_status ()
16520{
16521 return $1
16522} # as_fn_set_status
16523
16524# as_fn_exit STATUS
16525# -----------------
16526# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16527as_fn_exit ()
16528{
16529 set +e
16530 as_fn_set_status $1
16531 exit $1
16532} # as_fn_exit
16533
16534# as_fn_unset VAR
16535# ---------------
16536# Portably unset VAR.
16537as_fn_unset ()
16538{
16539 { eval $1=; unset $1;}
16540}
16541as_unset=as_fn_unset
16542# as_fn_append VAR VALUE
16543# ----------------------
16544# Append the text in VALUE to the end of the definition contained in VAR. Take
16545# advantage of any shell optimizations that allow amortized linear growth over
16546# repeated appends, instead of the typical quadratic growth present in naive
16547# implementations.
16548if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16549 eval 'as_fn_append ()
16550 {
16551 eval $1+=\$2
16552 }'
16553else
16554 as_fn_append ()
16555 {
16556 eval $1=\$$1\$2
16557 }
16558fi # as_fn_append
16559
16560# as_fn_arith ARG...
16561# ------------------
16562# Perform arithmetic evaluation on the ARGs, and store the result in the
16563# global $as_val. Take advantage of shells that can avoid forks. The arguments
16564# must be portable across $(()) and expr.
16565if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16566 eval 'as_fn_arith ()
16567 {
16568 as_val=$(( $* ))
16569 }'
16570else
16571 as_fn_arith ()
16572 {
16573 as_val=`expr "$@" || test $? -eq 1`
16574 }
16575fi # as_fn_arith
16576
16577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578if expr a : '\(a\)' >/dev/null 2>&1 &&
16579 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16580 as_expr=expr
16581else
16582 as_expr=false
16583fi
16584
16585if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16586 as_basename=basename
16587else
16588 as_basename=false
16589fi
16590
Matthias Kloseb9621712010-04-24 17:59:49 +000016591if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16592 as_dirname=dirname
16593else
16594 as_dirname=false
16595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597as_me=`$as_basename -- "$0" ||
16598$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16599 X"$0" : 'X\(//\)$' \| \
16600 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016601$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602 sed '/^.*\/\([^/][^/]*\)\/*$/{
16603 s//\1/
16604 q
16605 }
16606 /^X\/\(\/\/\)$/{
16607 s//\1/
16608 q
16609 }
16610 /^X\/\(\/\).*/{
16611 s//\1/
16612 q
16613 }
16614 s/.*/./; q'`
16615
Matthias Kloseb9621712010-04-24 17:59:49 +000016616# Avoid depending upon Character Ranges.
16617as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16618as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16619as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16620as_cr_digits='0123456789'
16621as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016622
16623ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016624case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016626 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016628 xy) ECHO_C='\c';;
16629 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16630 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 esac;;
16632*)
16633 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016635
Martin v. Löwis11437992002-04-12 09:54:03 +000016636rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637if test -d conf$$.dir; then
16638 rm -f conf$$.dir/conf$$.file
16639else
16640 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016643if (echo >conf$$.file) 2>/dev/null; then
16644 if ln -s conf$$.file conf$$ 2>/dev/null; then
16645 as_ln_s='ln -s'
16646 # ... but there are two gotchas:
16647 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16648 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016649 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016650 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016651 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016652 elif ln conf$$.file conf$$ 2>/dev/null; then
16653 as_ln_s=ln
16654 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016655 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016657else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016658 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16661rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016662
Matthias Kloseb9621712010-04-24 17:59:49 +000016663
16664# as_fn_mkdir_p
16665# -------------
16666# Create "$as_dir" as a directory, including parents if necessary.
16667as_fn_mkdir_p ()
16668{
16669
16670 case $as_dir in #(
16671 -*) as_dir=./$as_dir;;
16672 esac
16673 test -d "$as_dir" || eval $as_mkdir_p || {
16674 as_dirs=
16675 while :; do
16676 case $as_dir in #(
16677 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16678 *) as_qdir=$as_dir;;
16679 esac
16680 as_dirs="'$as_qdir' $as_dirs"
16681 as_dir=`$as_dirname -- "$as_dir" ||
16682$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16683 X"$as_dir" : 'X\(//\)[^/]' \| \
16684 X"$as_dir" : 'X\(//\)$' \| \
16685 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16686$as_echo X"$as_dir" |
16687 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16688 s//\1/
16689 q
16690 }
16691 /^X\(\/\/\)[^/].*/{
16692 s//\1/
16693 q
16694 }
16695 /^X\(\/\/\)$/{
16696 s//\1/
16697 q
16698 }
16699 /^X\(\/\).*/{
16700 s//\1/
16701 q
16702 }
16703 s/.*/./; q'`
16704 test -d "$as_dir" && break
16705 done
16706 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016707 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016708
16709
16710} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016711if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016712 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016713else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016714 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016715 as_mkdir_p=false
16716fi
16717
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016718
16719# as_fn_executable_p FILE
16720# -----------------------
16721# Test if FILE is an executable regular file.
16722as_fn_executable_p ()
16723{
16724 test -f "$1" && test -x "$1"
16725} # as_fn_executable_p
16726as_test_x='test -x'
16727as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
16729# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016730as_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 +000016731
16732# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016733as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016734
16735
Martin v. Löwis11437992002-04-12 09:54:03 +000016736exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016737## ----------------------------------- ##
16738## Main body of $CONFIG_STATUS script. ##
16739## ----------------------------------- ##
16740_ASEOF
16741test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016742
Matthias Kloseb9621712010-04-24 17:59:49 +000016743cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16744# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016745# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746# values after options handling.
16747ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016748This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016749generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016750
16751 CONFIG_FILES = $CONFIG_FILES
16752 CONFIG_HEADERS = $CONFIG_HEADERS
16753 CONFIG_LINKS = $CONFIG_LINKS
16754 CONFIG_COMMANDS = $CONFIG_COMMANDS
16755 $ $0 $@
16756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757on `(hostname || uname -n) 2>/dev/null | sed 1q`
16758"
16759
Martin v. Löwis11437992002-04-12 09:54:03 +000016760_ACEOF
16761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762case $ac_config_files in *"
16763"*) set x $ac_config_files; shift; ac_config_files=$*;;
16764esac
16765
16766case $ac_config_headers in *"
16767"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16768esac
16769
16770
16771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016772# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016773config_files="$ac_config_files"
16774config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016779ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016780\`$as_me' instantiates files and other configuration actions
16781from templates according to the current configuration. Unless the files
16782and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016783
Matthias Kloseb9621712010-04-24 17:59:49 +000016784Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 --config print configuration, then exit
16789 -q, --quiet, --silent
16790 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 -d, --debug don't remove temporary files
16792 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016793 --file=FILE[:TEMPLATE]
16794 instantiate the configuration file FILE
16795 --header=FILE[:TEMPLATE]
16796 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
16798Configuration files:
16799$config_files
16800
16801Configuration headers:
16802$config_headers
16803
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016804Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016807cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16808ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016809ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016810python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016811configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016813
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016814Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016815This config.status script is free software; the Free Software Foundation
16816gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817
16818ac_pwd='$ac_pwd'
16819srcdir='$srcdir'
16820INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016821MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016822test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
16824
Matthias Kloseb9621712010-04-24 17:59:49 +000016825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16826# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016827ac_need_defaults=:
16828while test $# != 0
16829do
16830 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016831 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16833 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016834 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016836 --*=)
16837 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16838 ac_optarg=
16839 ac_shift=:
16840 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016841 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016842 ac_option=$1
16843 ac_optarg=$2
16844 ac_shift=shift
16845 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 esac
16847
Skip Montanaro6dead952003-09-25 14:50:04 +000016848 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016850 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16851 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016852 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016853 $as_echo "$ac_cs_version"; exit ;;
16854 --config | --confi | --conf | --con | --co | --c )
16855 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 debug=: ;;
16858 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016859 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016860 case $ac_optarg in
16861 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016862 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 esac
16864 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 ac_need_defaults=false;;
16866 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016867 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016868 case $ac_optarg in
16869 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16870 esac
16871 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873 --he | --h)
16874 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016875 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016876Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016879 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16880 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16881 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016882
16883 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016884 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016885Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016886
Matthias Kloseb9621712010-04-24 17:59:49 +000016887 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016889
16890 esac
16891 shift
16892done
16893
Skip Montanaro6dead952003-09-25 14:50:04 +000016894ac_configure_extra_args=
16895
16896if $ac_cs_silent; then
16897 exec 6>/dev/null
16898 ac_configure_extra_args="$ac_configure_extra_args --silent"
16899fi
16900
16901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016903if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016904 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016905 shift
16906 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16907 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016909 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016910fi
16911
Martin v. Löwis11437992002-04-12 09:54:03 +000016912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914exec 5>>config.log
16915{
16916 echo
16917 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16918## Running $as_me. ##
16919_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016924cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016926
Matthias Kloseb9621712010-04-24 17:59:49 +000016927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928
16929# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016930for ac_config_target in $ac_config_targets
16931do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932 case $ac_config_target in
16933 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16934 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16935 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016936 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16937 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16939 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016940 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016941 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016942 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943
Victor Stinnere0be4232011-10-25 13:06:09 +020016944 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 esac
16946done
16947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948
Martin v. Löwis11437992002-04-12 09:54:03 +000016949# If the user did not use the arguments to specify the items to instantiate,
16950# then the envvar interface is used. Set only those that are not.
16951# We use the long form for the default assignment because of an extremely
16952# bizarre bug on SunOS 4.1.3.
16953if $ac_need_defaults; then
16954 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16955 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16956fi
16957
Skip Montanaro6dead952003-09-25 14:50:04 +000016958# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016960# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961# Hook for its removal unless debugging.
16962# Note that there is a small window in which the directory will not be cleaned:
16963# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016964$debug ||
16965{
Victor Stinnere0be4232011-10-25 13:06:09 +020016966 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016968 : "${ac_tmp:=$tmp}"
16969 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016970' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016971 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016972}
Martin v. Löwis11437992002-04-12 09:54:03 +000016973# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016974
Martin v. Löwis11437992002-04-12 09:54:03 +000016975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016977 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016978} ||
16979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016980 tmp=./conf$$-$RANDOM
16981 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016982} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016983ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016984
Matthias Kloseb9621712010-04-24 17:59:49 +000016985# Set up the scripts for CONFIG_FILES section.
16986# No need to generate them if there are no CONFIG_FILES.
16987# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016989
Matthias Kloseb9621712010-04-24 17:59:49 +000016990
16991ac_cr=`echo X | tr X '\015'`
16992# On cygwin, bash can eat \r inside `` if the user requested igncr.
16993# But we know of no other shell where ac_cr would be empty at this
16994# point, so we can use a bashism as a fallback.
16995if test "x$ac_cr" = x; then
16996 eval ac_cr=\$\'\\r\'
16997fi
16998ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16999if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017000 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017001else
17002 ac_cs_awk_cr=$ac_cr
17003fi
17004
Victor Stinnere0be4232011-10-25 13:06:09 +020017005echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017006_ACEOF
17007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008
Matthias Kloseb9621712010-04-24 17:59:49 +000017009{
17010 echo "cat >conf$$subs.awk <<_ACEOF" &&
17011 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17012 echo "_ACEOF"
17013} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017014 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17015ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016ac_delim='%!_!# '
17017for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017018 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017019 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17022 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023 break
17024 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017025 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026 else
17027 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029done
Matthias Kloseb9621712010-04-24 17:59:49 +000017030rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031
Matthias Kloseb9621712010-04-24 17:59:49 +000017032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017033cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017035sed -n '
17036h
17037s/^/S["/; s/!.*/"]=/
17038p
17039g
17040s/^[^!]*!//
17041:repl
17042t repl
17043s/'"$ac_delim"'$//
17044t delim
17045:nl
17046h
17047s/\(.\{148\}\)..*/\1/
17048t more1
17049s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17050p
17051n
17052b repl
17053:more1
17054s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17055p
17056g
17057s/.\{148\}//
17058t nl
17059:delim
17060h
17061s/\(.\{148\}\)..*/\1/
17062t more2
17063s/["\\]/\\&/g; s/^/"/; s/$/"/
17064p
17065b
17066:more2
17067s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17068p
17069g
17070s/.\{148\}//
17071t delim
17072' <conf$$subs.awk | sed '
17073/^[^""]/{
17074 N
17075 s/\n//
17076}
17077' >>$CONFIG_STATUS || ac_write_fail=1
17078rm -f conf$$subs.awk
17079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17080_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017081cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 for (key in S) S_is_set[key] = 1
17083 FS = ""
17084
17085}
17086{
17087 line = $ 0
17088 nfields = split(line, field, "@")
17089 substed = 0
17090 len = length(field[1])
17091 for (i = 2; i < nfields; i++) {
17092 key = field[i]
17093 keylen = length(key)
17094 if (S_is_set[key]) {
17095 value = S[key]
17096 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17097 len += length(value) + length(field[++i])
17098 substed = 1
17099 } else
17100 len += 1 + keylen
17101 }
17102
17103 print line
17104}
17105
17106_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17109if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17110 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17111else
17112 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017113fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017115_ACEOF
17116
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017117# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17118# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119# trailing colons and then remove the whole line if VPATH becomes empty
17120# (actually we leave an empty line to preserve line numbers).
17121if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017122 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17123h
17124s///
17125s/^/:/
17126s/[ ]*$/:/
17127s/:\$(srcdir):/:/g
17128s/:\${srcdir}:/:/g
17129s/:@srcdir@:/:/g
17130s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017132x
17133s/\(=[ ]*\).*/\1/
17134G
17135s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136s/^[^=]*=[ ]*$//
17137}'
17138fi
17139
Matthias Kloseb9621712010-04-24 17:59:49 +000017140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017141fi # test -n "$CONFIG_FILES"
17142
Matthias Kloseb9621712010-04-24 17:59:49 +000017143# Set up the scripts for CONFIG_HEADERS section.
17144# No need to generate them if there are no CONFIG_HEADERS.
17145# This happens for instance with `./config.status Makefile'.
17146if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017147cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017148BEGIN {
17149_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150
Matthias Kloseb9621712010-04-24 17:59:49 +000017151# Transform confdefs.h into an awk script `defines.awk', embedded as
17152# here-document in config.status, that substitutes the proper values into
17153# config.h.in to produce config.h.
17154
17155# Create a delimiter string that does not exist in confdefs.h, to ease
17156# handling of long lines.
17157ac_delim='%!_!# '
17158for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017159 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17160 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017161 break
17162 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017163 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017164 else
17165 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17166 fi
17167done
17168
17169# For the awk script, D is an array of macro values keyed by name,
17170# likewise P contains macro parameters if any. Preserve backslash
17171# newline sequences.
17172
17173ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17174sed -n '
17175s/.\{148\}/&'"$ac_delim"'/g
17176t rset
17177:rset
17178s/^[ ]*#[ ]*define[ ][ ]*/ /
17179t def
17180d
17181:def
17182s/\\$//
17183t bsnl
17184s/["\\]/\\&/g
17185s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17186D["\1"]=" \3"/p
17187s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17188d
17189:bsnl
17190s/["\\]/\\&/g
17191s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17192D["\1"]=" \3\\\\\\n"\\/p
17193t cont
17194s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17195t cont
17196d
17197:cont
17198n
17199s/.\{148\}/&'"$ac_delim"'/g
17200t clear
17201:clear
17202s/\\$//
17203t bsnlc
17204s/["\\]/\\&/g; s/^/"/; s/$/"/p
17205d
17206:bsnlc
17207s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17208b cont
17209' <confdefs.h | sed '
17210s/'"$ac_delim"'/"\\\
17211"/g' >>$CONFIG_STATUS || ac_write_fail=1
17212
17213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17214 for (key in D) D_is_set[key] = 1
17215 FS = ""
17216}
17217/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17218 line = \$ 0
17219 split(line, arg, " ")
17220 if (arg[1] == "#") {
17221 defundef = arg[2]
17222 mac1 = arg[3]
17223 } else {
17224 defundef = substr(arg[1], 2)
17225 mac1 = arg[2]
17226 }
17227 split(mac1, mac2, "(") #)
17228 macro = mac2[1]
17229 prefix = substr(line, 1, index(line, defundef) - 1)
17230 if (D_is_set[macro]) {
17231 # Preserve the white space surrounding the "#".
17232 print prefix "define", macro P[macro] D[macro]
17233 next
17234 } else {
17235 # Replace #undef with comments. This is necessary, for example,
17236 # in the case of _POSIX_SOURCE, which is predefined and required
17237 # on some systems where configure will not decide to define it.
17238 if (defundef == "undef") {
17239 print "/*", prefix defundef, macro, "*/"
17240 next
17241 }
17242 }
17243}
17244{ print }
17245_ACAWK
17246_ACEOF
17247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017248 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017249fi # test -n "$CONFIG_HEADERS"
17250
17251
17252eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17253shift
17254for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255do
17256 case $ac_tag in
17257 :[FHLC]) ac_mode=$ac_tag; continue;;
17258 esac
17259 case $ac_mode$ac_tag in
17260 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017261 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262 :[FH]-) ac_tag=-:-;;
17263 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17264 esac
17265 ac_save_IFS=$IFS
17266 IFS=:
17267 set x $ac_tag
17268 IFS=$ac_save_IFS
17269 shift
17270 ac_file=$1
17271 shift
17272
17273 case $ac_mode in
17274 :L) ac_source=$1;;
17275 :[FH])
17276 ac_file_inputs=
17277 for ac_f
17278 do
17279 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017280 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 *) # Look for the file first in the build tree, then in the source tree
17282 # (if the path is not absolute). The absolute path cannot be DOS-style,
17283 # because $ac_f cannot contain `:'.
17284 test -f "$ac_f" ||
17285 case $ac_f in
17286 [\\/$]*) false;;
17287 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17288 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017289 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017291 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17292 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 done
17294
17295 # Let's still pretend it is `configure' which instantiates (i.e., don't
17296 # use $as_me), people would be surprised to read:
17297 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 configure_input='Generated from '`
17299 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17300 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 if test x"$ac_file" != x-; then
17302 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017303 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17304$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017306 # Neutralize special characters interpreted by sed in replacement strings.
17307 case $configure_input in #(
17308 *\&* | *\|* | *\\* )
17309 ac_sed_conf_input=`$as_echo "$configure_input" |
17310 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17311 *) ac_sed_conf_input=$configure_input;;
17312 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313
17314 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017315 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17316 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 esac
17318 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017319 esac
17320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017322$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017323 X"$ac_file" : 'X\(//\)[^/]' \| \
17324 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017326$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17328 s//\1/
17329 q
17330 }
17331 /^X\(\/\/\)[^/].*/{
17332 s//\1/
17333 q
17334 }
17335 /^X\(\/\/\)$/{
17336 s//\1/
17337 q
17338 }
17339 /^X\(\/\).*/{
17340 s//\1/
17341 q
17342 }
17343 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017344 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 ac_builddir=.
17346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347case "$ac_dir" in
17348.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17349*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017352 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353 case $ac_top_builddir_sub in
17354 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17355 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17356 esac ;;
17357esac
17358ac_abs_top_builddir=$ac_pwd
17359ac_abs_builddir=$ac_pwd$ac_dir_suffix
17360# for backward compatibility:
17361ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017362
17363case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017365 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366 ac_top_srcdir=$ac_top_builddir_sub
17367 ac_abs_top_srcdir=$ac_pwd ;;
17368 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017369 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 ac_top_srcdir=$srcdir
17371 ac_abs_top_srcdir=$srcdir ;;
17372 *) # Relative name.
17373 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17374 ac_top_srcdir=$ac_top_build_prefix$srcdir
17375 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017376esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017378
Martin v. Löwis11437992002-04-12 09:54:03 +000017379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 case $ac_mode in
17381 :F)
17382 #
17383 # CONFIG_FILE
17384 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017385
17386 case $INSTALL in
17387 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017390 ac_MKDIR_P=$MKDIR_P
17391 case $MKDIR_P in
17392 [\\/$]* | ?:[\\/]* ) ;;
17393 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17394 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017395_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396
Matthias Kloseb9621712010-04-24 17:59:49 +000017397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398# If the template does not know about datarootdir, expand it.
17399# FIXME: This hack should be removed a few years after 2.60.
17400ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017401ac_sed_dataroot='
17402/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403 p
17404 q
17405}
17406/@datadir@/p
17407/@docdir@/p
17408/@infodir@/p
17409/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017410/@mandir@/p'
17411case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412*datarootdir*) ac_datarootdir_seen=yes;;
17413*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17415$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 ac_datarootdir_hack='
17419 s&@datadir@&$datadir&g
17420 s&@docdir@&$docdir&g
17421 s&@infodir@&$infodir&g
17422 s&@localedir@&$localedir&g
17423 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017424 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425esac
17426_ACEOF
17427
17428# Neutralize VPATH when `$srcdir' = `.'.
17429# Shell code in configure.ac might set extrasub.
17430# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17432ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017433$extrasub
17434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017436:t
17437/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017438s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017440s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441s&@srcdir@&$ac_srcdir&;t t
17442s&@abs_srcdir@&$ac_abs_srcdir&;t t
17443s&@top_srcdir@&$ac_top_srcdir&;t t
17444s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17445s&@builddir@&$ac_builddir&;t t
17446s&@abs_builddir@&$ac_abs_builddir&;t t
17447s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17448s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017449s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017450$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017451"
Victor Stinnere0be4232011-10-25 13:06:09 +020017452eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17453 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017456 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17457 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17458 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017460which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017461$as_echo "$as_me: 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" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017463
Victor Stinnere0be4232011-10-25 13:06:09 +020017464 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017466 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17467 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017468 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017469 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 ;;
17471 :H)
17472 #
17473 # CONFIG_HEADER
17474 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 {
17477 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017478 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17479 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017480 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017481 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17483$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017484 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017486 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017487 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 fi
17489 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017491 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017492 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496
17497 esac
17498
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017499
17500 case $ac_file$ac_mode in
17501 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17502
17503 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504done # for ac_tag
17505
Guido van Rossum627b2d71993-12-24 10:39:16 +000017506
Matthias Kloseb9621712010-04-24 17:59:49 +000017507as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017508_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017509ac_clean_files=$ac_clean_files_save
17510
Matthias Kloseb9621712010-04-24 17:59:49 +000017511test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017512 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017513
Martin v. Löwis11437992002-04-12 09:54:03 +000017514
17515# configure is writing to config.log, and then calls config.status.
17516# config.status does its own redirection, appending to config.log.
17517# Unfortunately, on DOS this fails, as config.log is still kept open
17518# by configure, so config.status won't be able to write to it; its
17519# output is simply discarded. So we exec the FD to /dev/null,
17520# effectively closing config.log, so it can be properly (re)opened and
17521# appended to by config.status. When coming back to configure, we
17522# need to make the FD available again.
17523if test "$no_create" != yes; then
17524 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017525 ac_config_status_args=
17526 test "$silent" = yes &&
17527 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017528 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017529 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017530 exec 5>>config.log
17531 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17532 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017533 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017534fi
17535if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17537$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017538fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017539
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017540
Christian Heimes75ed8902013-11-20 01:11:18 +010017541echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017542if test ! -f Modules/Setup
17543then
17544 cp $srcdir/Modules/Setup.dist Modules/Setup
17545fi
17546
Christian Heimes75ed8902013-11-20 01:11:18 +010017547echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017548if test ! -f Modules/Setup.local
17549then
17550 echo "# Edit this file for local setup changes" >Modules/Setup.local
17551fi
17552
Christian Heimes75ed8902013-11-20 01:11:18 +010017553echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017554$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17555 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017556 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017557mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017558
17559if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17560 echo "" >&6
17561 echo "" >&6
17562 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17563 echo "please run ./configure --with-optimizations" >&6
17564 echo "" >&6
17565 echo "" >&6
17566fi
17567