blob: 8b824b24365113bc3d306c8696c65a39c2143f61 [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.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
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'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
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
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
812with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600813with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001399\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001465 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001504 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001505 --with-lto Enable Link Time Optimization in PGO builds.
1506 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
1510 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001512 --with-system-expat build pyexpat module using an installed expat
1513 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001514 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001515 --with-system-libmpdec build _decimal module using an installed libmpdec
1516 library
Ned Deilyd819b932013-09-06 01:07:05 -07001517 --with-tcltk-includes='-I...'
1518 override search for Tcl and Tk include files
1519 --with-tcltk-libs='-L...'
1520 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001521 --with-dbmliborder=db1:db2:...
1522 order to check db backends for dbm. Valid value is a
1523 colon separated string with the backend names
1524 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
1530 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001531 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001532 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001624python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Ned Deily4829bc62016-09-12 17:29:04 -04002333It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002683if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002684 # If we're building out-of-tree, we need to make sure the following
2685 # resources get picked up before their $srcdir counterparts.
2686 # Objects/ -> typeslots.inc
2687 # Include/ -> Python-ast.h, graminit.h
2688 # Python/ -> importlib.h
2689 # (A side effect of this is that these resources will automatically be
2690 # regenerated when building out-of-tree, regardless of whether or not
2691 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2692 # off.)
2693 BASECPPFLAGS="-IObjects -IInclude -IPython"
2694else
2695 BASECPPFLAGS=""
2696fi
2697
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002698
2699
2700
2701
Victor Stinner9ed34a82017-05-02 22:35:58 +02002702if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002704# Extract the first word of "git", so it can be a program name with args.
2705set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002708if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709 $as_echo_n "(cached) " >&6
2710else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002711 if test -n "$HAS_GIT"; then
2712 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713else
2714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715for as_dir in $PATH
2716do
2717 IFS=$as_save_IFS
2718 test -z "$as_dir" && as_dir=.
2719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723 break 2
2724 fi
2725done
2726 done
2727IFS=$as_save_IFS
2728
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730fi
2731fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732HAS_GIT=$ac_cv_prog_HAS_GIT
2733if test -n "$HAS_GIT"; then
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2735$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736else
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2738$as_echo "no" >&6; }
2739fi
2740
2741
2742else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746then
Ned Deily554626a2017-03-20 23:41:52 -04002747 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2748 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751 GITVERSION=""
2752 GITTAG=""
2753 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
2755
2756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
2759
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002760ac_aux_dir=
2761for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2762 if test -f "$ac_dir/install-sh"; then
2763 ac_aux_dir=$ac_dir
2764 ac_install_sh="$ac_aux_dir/install-sh -c"
2765 break
2766 elif test -f "$ac_dir/install.sh"; then
2767 ac_aux_dir=$ac_dir
2768 ac_install_sh="$ac_aux_dir/install.sh -c"
2769 break
2770 elif test -f "$ac_dir/shtool"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/shtool install -c"
2773 break
2774 fi
2775done
2776if test -z "$ac_aux_dir"; then
2777 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2778fi
2779
2780# These three variables are undocumented and unsupported,
2781# and are intended to be withdrawn in a future Autoconf release.
2782# They can cause serious problems if a builder's source tree is in a directory
2783# whose full name contains unusual characters.
2784ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2785ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2786ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2787
2788
2789# Make sure we can run config.sub.
2790$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2791 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2792
2793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2794$as_echo_n "checking build system type... " >&6; }
2795if ${ac_cv_build+:} false; then :
2796 $as_echo_n "(cached) " >&6
2797else
2798 ac_build_alias=$build_alias
2799test "x$ac_build_alias" = x &&
2800 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2801test "x$ac_build_alias" = x &&
2802 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2803ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2804 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2805
2806fi
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2808$as_echo "$ac_cv_build" >&6; }
2809case $ac_cv_build in
2810*-*-*) ;;
2811*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2812esac
2813build=$ac_cv_build
2814ac_save_IFS=$IFS; IFS='-'
2815set x $ac_cv_build
2816shift
2817build_cpu=$1
2818build_vendor=$2
2819shift; shift
2820# Remember, the first character of IFS is used to create $*,
2821# except with old shells:
2822build_os=$*
2823IFS=$ac_save_IFS
2824case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2825
2826
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2828$as_echo_n "checking host system type... " >&6; }
2829if ${ac_cv_host+:} false; then :
2830 $as_echo_n "(cached) " >&6
2831else
2832 if test "x$host_alias" = x; then
2833 ac_cv_host=$ac_cv_build
2834else
2835 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2836 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2837fi
2838
2839fi
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2841$as_echo "$ac_cv_host" >&6; }
2842case $ac_cv_host in
2843*-*-*) ;;
2844*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2845esac
2846host=$ac_cv_host
2847ac_save_IFS=$IFS; IFS='-'
2848set x $ac_cv_host
2849shift
2850host_cpu=$1
2851host_vendor=$2
2852shift; shift
2853# Remember, the first character of IFS is used to create $*,
2854# except with old shells:
2855host_os=$*
2856IFS=$ac_save_IFS
2857case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2858
2859
2860
doko@python.orga10e4a92013-01-25 18:45:12 +01002861
2862
Ned Deilyfcbc2462014-08-22 13:32:49 -07002863# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2864rm -f pybuilddir.txt
2865
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002866for ac_prog in python$PACKAGE_VERSION python3 python
2867do
2868 # Extract the first word of "$ac_prog", so it can be a program name with args.
2869set dummy $ac_prog; ac_word=$2
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2871$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002872if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002873 $as_echo_n "(cached) " >&6
2874else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002875 if test -n "$PYTHON_FOR_REGEN"; then
2876 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877else
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881 IFS=$as_save_IFS
2882 test -z "$as_dir" && as_dir=.
2883 for ac_exec_ext in '' $ac_executable_extensions; do
2884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2887 break 2
2888 fi
2889done
2890 done
2891IFS=$as_save_IFS
2892
2893fi
2894fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2896if test -n "$PYTHON_FOR_REGEN"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2898$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002899else
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
2902fi
2903
2904
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909
2910
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002911if test "$cross_compiling" = yes; then
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2913$as_echo_n "checking for python interpreter for cross build... " >&6; }
2914 if test -z "$PYTHON_FOR_BUILD"; then
2915 for interp in python$PACKAGE_VERSION python3 python; do
2916 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002917 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 +02002918 break
2919 fi
2920 interp=
2921 done
2922 if test x$interp = x; then
2923 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2924 fi
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2926$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002927 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002929elif test "$cross_compiling" = maybe; then
2930 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931else
2932 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2933fi
2934
2935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Benjamin Petersond23f8222009-04-05 19:13:16 +00002937if test "$prefix" != "/"; then
2938 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2939fi
2940
2941
Martin v. Löwis11437992002-04-12 09:54:03 +00002942
2943
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002944# We don't use PACKAGE_ variables, and they cause conflicts
2945# with other autoconf-based packages that include Python.h
2946grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2947rm confdefs.h
2948mv confdefs.h.new confdefs.h
2949
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002950
Ned Deily4829bc62016-09-12 17:29:04 -04002951VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002952
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002953# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002954
2955SOVERSION=1.0
2956
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002957# The later defininition of _XOPEN_SOURCE disables certain features
2958# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2959
Matthias Kloseb9621712010-04-24 17:59:49 +00002960$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002961
2962
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002963# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2964# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2965# them.
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002968
2969
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2972# them.
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002975
2976
Martin v. Löwisd6320502004-08-12 13:45:08 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002981
2982
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002988
2989
2990
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002991define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002992
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002993# Arguments passed to configure.
2994
2995CONFIG_ARGS="$ac_configure_args"
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2998$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002999# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003000if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003002 case $enableval in
3003 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003004 # Locate the best usable SDK, see Mac/README.txt for more
3005 # information
3006 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003007 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003008 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003009 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3010 if test ! -d "${enableval}"
3011 then
3012 enableval=/
3013 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003014 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003015 ;;
3016 esac
3017 case $enableval in
3018 no)
3019 UNIVERSALSDK=
3020 enable_universalsdk=
3021 ;;
3022 *)
3023 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003024 if test ! -d "${UNIVERSALSDK}"
3025 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003026 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003028 ;;
3029 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032else
3033
3034 UNIVERSALSDK=
3035 enable_universalsdk=
3036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039if test -n "${UNIVERSALSDK}"
3040then
Matthias Kloseb9621712010-04-24 17:59:49 +00003041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3042$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043else
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3045$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003049
Ned Deily87adb6e2013-10-18 21:09:56 -07003050ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003051
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052# For backward compatibility reasons we prefer to select '32-bit' if available,
3053# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003054UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003055if test "`uname -s`" = "Darwin"
3056then
3057 if test -n "${UNIVERSALSDK}"
3058 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003059 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060 then
3061 UNIVERSAL_ARCHS="intel"
3062 fi
3063 fi
3064fi
3065
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003066
Matthias Kloseb9621712010-04-24 17:59:49 +00003067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3068$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069
3070# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003071if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073 UNIVERSAL_ARCHS="$withval"
3074
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075fi
3076
Ned Deily87adb6e2013-10-18 21:09:56 -07003077if test -n "${UNIVERSALSDK}"
3078then
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3080$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3081else
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3083$as_echo "no" >&6; }
3084fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003086
3087# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003089 withval=$with_framework_name;
3090 PYTHONFRAMEWORK=${withval}
3091 PYTHONFRAMEWORKDIR=${withval}.framework
3092 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3093
3094else
3095
3096 PYTHONFRAMEWORK=Python
3097 PYTHONFRAMEWORKDIR=Python.framework
3098 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3099
3100fi
3101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003102# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003103if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003105 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003106 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003107 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003108 esac
3109 case $enableval in
3110 no)
3111 PYTHONFRAMEWORK=
3112 PYTHONFRAMEWORKDIR=no-framework
3113 PYTHONFRAMEWORKPREFIX=
3114 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115 FRAMEWORKINSTALLFIRST=
3116 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003117 FRAMEWORKALTINSTALLFIRST=
3118 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003119 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003120 if test "x${prefix}" = "xNONE"; then
3121 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3122 else
3123 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3124 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003126 ;;
3127 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003128 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003129 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003131 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003132 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3133 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003134 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003135 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 if test "x${prefix}" = "xNONE" ; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 else
3141 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3142 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143
3144 case "${enableval}" in
3145 /System*)
3146 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3147 if test "${prefix}" = "NONE" ; then
3148 # See below
3149 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3150 fi
3151 ;;
3152
3153 /Library*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 ;;
3156
3157 */Library/Frameworks)
3158 MDIR="`dirname "${enableval}"`"
3159 MDIR="`dirname "${MDIR}"`"
3160 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3161
3162 if test "${prefix}" = "NONE"; then
3163 # User hasn't specified the
3164 # --prefix option, but wants to install
3165 # the framework in a non-default location,
3166 # ensure that the compatibility links get
3167 # installed relative to that prefix as well
3168 # instead of in /usr/local.
3169 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3170 fi
3171 ;;
3172
3173 *)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176 esac
3177
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003180 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003186 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3187
3188 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3189
Jack Jansene578a632001-08-15 01:27:14 +00003190 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003191
Guido van Rossum563e7081996-09-10 18:20:48 +00003192else
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Jack Jansene578a632001-08-15 01:27:14 +00003194 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003195 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORKPREFIX=
3197 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198 FRAMEWORKINSTALLFIRST=
3199 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003200 FRAMEWORKALTINSTALLFIRST=
3201 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003202 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003203 if test "x${prefix}" = "xNONE" ; then
3204 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3205 else
3206 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3207 fi
Jack Jansene578a632001-08-15 01:27:14 +00003208 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003209
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211fi
3212
Thomas Wouters477c8d52006-05-27 19:21:47 +00003213
3214
Michael W. Hudson54241132001-12-07 15:38:26 +00003215
3216
3217
3218
Jack Jansene578a632001-08-15 01:27:14 +00003219
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220
3221
3222
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003223
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003224
Ned Deilyb8f944f2013-11-21 22:42:25 -08003225
Jack Jansene578a632001-08-15 01:27:14 +00003226##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003227## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003228## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003229##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230# Set name for machine-dependent library files
3231
Matthias Kloseb9621712010-04-24 17:59:49 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3233$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003234if test -z "$MACHDEP"
3235then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003236 # avoid using uname for cross builds
3237 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003238 # ac_sys_system and ac_sys_release are used for setting
3239 # a lot of different things including 'define_xopen_source'
3240 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003241 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003242 *-*-linux-android*)
3243 ac_sys_system=Linux-android
3244 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 *-*-linux*)
3246 ac_sys_system=Linux
3247 ;;
3248 *-*-cygwin*)
3249 ac_sys_system=Cygwin
3250 ;;
3251 *)
3252 # for now, limit cross builds to known configurations
3253 MACHDEP="unknown"
3254 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3255 esac
3256 ac_sys_release=
3257 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003258 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003259 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003260 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003261 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 fi
3266 ac_md_system=`echo $ac_sys_system |
3267 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3268 ac_md_release=`echo $ac_sys_release |
3269 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3270 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003271
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003273 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003274 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003275 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003276 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003277 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279fi
Guido van Rossum91922671997-10-09 20:24:13 +00003280
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003281
3282if test "$cross_compiling" = yes; then
3283 case "$host" in
3284 *-*-linux*)
3285 case "$host_cpu" in
3286 arm*)
3287 _host_cpu=arm
3288 ;;
3289 *)
3290 _host_cpu=$host_cpu
3291 esac
3292 ;;
3293 *-*-cygwin*)
3294 _host_cpu=
3295 ;;
3296 *)
3297 # for now, limit cross builds to known configurations
3298 MACHDEP="unknown"
3299 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3300 esac
3301 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3302fi
3303
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003304# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3305# disable features if it is defined, without any means to access these
3306# features as extensions. For these systems, we skip the definition of
3307# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3308# some feature, make sure there is no alternative way to access this
3309# feature. Also, when using wildcards, make sure you have verified the
3310# need for not defining _XOPEN_SOURCE on all systems matching the
3311# wildcard, and that the wildcard does not include future systems
3312# (which may remove their limitations).
3313case $ac_sys_system/$ac_sys_release in
3314 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3315 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003316 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003317 # In addition, Stefan Krah confirms that issue #1244610 exists through
3318 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003319 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003320 define_xopen_source=no
3321 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3322 # also defined. This can be overridden by defining _BSD_SOURCE
3323 # As this has a different meaning on Linux, only define it on OpenBSD
3324
Matthias Kloseb9621712010-04-24 17:59:49 +00003325$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326
3327 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003328 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003334
3335 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003336 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3337 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3338 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003339 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 +00003340 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003341 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3342 # request to enable features supported by the standard as a request
3343 # to disable features not supported by the standard. The best way
3344 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3345 # entirely and define __EXTENSIONS__ instead.
3346 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003347 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003348 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3349 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003350 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003351 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003352 define_xopen_source=no;;
3353 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003354 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003355 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003356 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003357 # On FreeBSD 4, the math functions C89 does not cover are never defined
3358 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3359 FreeBSD/4.*)
3360 define_xopen_source=no;;
3361 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3362 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3363 # identifies itself as Darwin/7.*
3364 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3365 # disables platform specific features beyond repair.
3366 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3367 # has no effect, don't bother defining them
3368 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003369 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003370 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003371 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003372 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3373 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3374 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003375 AIX/4)
3376 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003377 AIX/5)
3378 if test `uname -r` -eq 1; then
3379 define_xopen_source=no
3380 fi
3381 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003382 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3383 # defining NI_NUMERICHOST.
3384 QNX/6.3.2)
3385 define_xopen_source=no
3386 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003387
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003388esac
3389
3390if test $define_xopen_source = yes
3391then
Victor Stinner14d098d2011-09-07 22:29:43 +02003392 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
Victor Stinner14d098d2011-09-07 22:29:43 +02003394$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003395
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003396
3397 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3398 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3399 # several APIs are not declared. Since this is also needed in some
3400 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Matthias Kloseb9621712010-04-24 17:59:49 +00003402$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
3404
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003405
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003406$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408fi
3409
Christian Heimes647cd872013-12-07 23:39:33 +01003410# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3411case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003412 hp*|HP*)
3413 define_stdc_a1=yes;;
3414 *)
3415 define_stdc_a1=no;;
3416esac
3417
3418if test $define_stdc_a1 = yes
3419then
Christian Heimes647cd872013-12-07 23:39:33 +01003420
3421$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3422
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423fi
Christian Heimes647cd872013-12-07 23:39:33 +01003424
Guido van Rossum91922671997-10-09 20:24:13 +00003425#
3426# SGI compilers allow the specification of the both the ABI and the
3427# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003428# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003429#
3430# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3431# thus supply support for various ABI/ISA combinations. The MACHDEP
3432# variable is also adjusted.
3433#
3434
3435if test ! -z "$SGI_ABI"
3436then
3437 CC="cc $SGI_ABI"
3438 LDFLAGS="$SGI_ABI $LDFLAGS"
3439 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3442$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3445# it may influence the way we can build extensions, so distutils
3446# needs to check it
3447
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453
3454# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3455# for debug/optimization stuff. BASECFLAGS is for flags that are required
3456# just to get things to compile and link. Users are free to override OPT
3457# when running configure or make. The build should not break if they do.
3458# BASECFLAGS should generally not be messed with, however.
3459
3460# XXX shouldn't some/most/all of this code be merged with the stuff later
3461# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3463$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003466if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003469 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003470 without_gcc=yes;;
3471 yes) CC=gcc
3472 without_gcc=no;;
3473 *) CC=$withval
3474 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003475 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476else
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003478 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003479 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003480 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003481 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003482 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483fi
3484
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3486$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003487
Zachary Ware5af85642015-12-21 12:09:17 -06003488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3489$as_echo_n "checking for --with-icc... " >&6; }
3490
3491# Check whether --with-icc was given.
3492if test "${with_icc+set}" = set; then :
3493 withval=$with_icc;
3494 case $withval in
3495 no) CC=${CC:-cc}
3496 with_icc=no;;
3497 yes) CC=icc
3498 CXX=icpc
3499 with_icc=yes;;
3500 *) CC=$withval
3501 with_icc=$withval;;
3502 esac
3503else
3504
3505 with_icc=no
3506fi
3507
3508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3509$as_echo "$with_icc" >&6; }
3510
Guido van Rossum8b131c51995-03-09 14:10:13 +00003511# If the user switches compilers, we can't believe the cache
3512if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3513then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003514 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003515(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003516fi
3517
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003518# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3519# when the compiler supports them, but we don't always want -O2, and
3520# we set -g later.
3521if test -z "$CFLAGS"; then
3522 CFLAGS=
3523fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524
3525if test "$ac_sys_system" = "Darwin"
3526then
3527 # Compiler selection on MacOSX is more complicated than
3528 # AC_PROG_CC can handle, see Mac/README.txt for more
3529 # information
3530 if test -z "${CC}"
3531 then
3532 found_gcc=
3533 found_clang=
3534 as_save_IFS=$IFS; IFS=:
3535 for as_dir in $PATH
3536 do
3537 IFS=$as_save_IFS
3538 if test -x $as_dir/gcc; then
3539 if test -z "${found_gcc}"; then
3540 found_gcc=$as_dir/gcc
3541 fi
3542 fi
3543 if test -x $as_dir/clang; then
3544 if test -z "${found_clang}"; then
3545 found_clang=$as_dir/clang
3546 fi
3547 fi
3548 done
3549 IFS=$as_save_IFS
3550
3551 if test -n "$found_gcc" -a -n "$found_clang"
3552 then
3553 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3554 then
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3556$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3557 CC="$found_clang"
3558 CXX="$found_clang++"
3559 fi
3560
3561
3562 elif test -z "$found_gcc" -a -n "$found_clang"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3565$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3566 CC="$found_clang"
3567 CXX="$found_clang++"
3568
3569 elif test -z "$found_gcc" -a -z "$found_clang"
3570 then
3571 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3572 if test -n "${found_clang}"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3575$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3576 CC="${found_clang}"
3577 CXX="`/usr/bin/xcrun -find clang++`"
3578
3579 # else: use default behaviour
3580 fi
3581 fi
3582 fi
3583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003584ac_ext=c
3585ac_cpp='$CPP $CPPFLAGS'
3586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3588ac_compiler_gnu=$ac_cv_c_compiler_gnu
3589if test -n "$ac_tool_prefix"; then
3590 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3591set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3593$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003594if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003596else
3597 if test -n "$CC"; then
3598 ac_cv_prog_CC="$CC" # Let the user override the test.
3599else
Martin v. Löwis11437992002-04-12 09:54:03 +00003600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601for as_dir in $PATH
3602do
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $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 +00003609 break 2
3610 fi
3611done
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003614
Jack Jansendd19cf82001-12-06 22:36:17 +00003615fi
3616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003617CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003618if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3620$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003621else
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3623$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624fi
3625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628if test -z "$ac_cv_prog_CC"; then
3629 ac_ct_CC=$CC
3630 # Extract the first word of "gcc", so it can be a program name with args.
3631set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003634if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003636else
3637 if test -n "$ac_ct_CC"; then
3638 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3639else
3640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
3655fi
3656fi
3657ac_ct_CC=$ac_cv_prog_ac_ct_CC
3658if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3660$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666 if test "x$ac_ct_CC" = x; then
3667 CC=""
3668 else
3669 case $cross_compiling:$ac_tool_warned in
3670yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673ac_tool_warned=yes ;;
3674esac
3675 CC=$ac_ct_CC
3676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
3678 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003679fi
3680
Jack Jansendd19cf82001-12-06 22:36:17 +00003681if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test -n "$ac_tool_prefix"; then
3683 # 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 +00003684set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003687if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003689else
3690 if test -n "$CC"; then
3691 ac_cv_prog_CC="$CC" # Let the user override the test.
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $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 +00003702 break 2
3703 fi
3704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708fi
3709fi
3710CC=$ac_cv_prog_CC
3711if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3713$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003717fi
3718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 # Extract the first word of "cc", so it can be a program name with args.
3724set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3726$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003727if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003729else
3730 if test -n "$CC"; then
3731 ac_cv_prog_CC="$CC" # Let the user override the test.
3732else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3742 ac_prog_rejected=yes
3743 continue
3744 fi
3745 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 $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 +00003747 break 2
3748 fi
3749done
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test $ac_prog_rejected = yes; then
3754 # We found a bogon in the path, so make sure we never use it.
3755 set dummy $ac_cv_prog_CC
3756 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758 # We chose a different compiler from the bogus one.
3759 # However, it has the same basename, so the bogon will be chosen
3760 # first if we set CC to just the basename; use the full file name.
3761 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003762 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763 fi
3764fi
3765fi
3766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003767CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3770$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771else
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3773$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774fi
3775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
3778if test -z "$CC"; then
3779 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 do
3782 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3783set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3785$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003786if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003788else
3789 if test -n "$CC"; then
3790 ac_cv_prog_CC="$CC" # Let the user override the test.
3791else
Martin v. Löwis11437992002-04-12 09:54:03 +00003792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3793for as_dir in $PATH
3794do
3795 IFS=$as_save_IFS
3796 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $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 +00003801 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003803done
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
3807fi
3808fi
3809CC=$ac_cv_prog_CC
3810if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3812$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003816fi
3817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 test -n "$CC" && break
3820 done
3821fi
3822if test -z "$CC"; then
3823 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003825do
3826 # Extract the first word of "$ac_prog", so it can be a program name with args.
3827set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3829$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003830if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
3833 if test -n "$ac_ct_CC"; then
3834 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3835else
3836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3837for as_dir in $PATH
3838do
3839 IFS=$as_save_IFS
3840 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 $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 +00003845 break 2
3846 fi
3847done
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
3852fi
3853ac_ct_CC=$ac_cv_prog_ac_ct_CC
3854if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3856$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003857else
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 test -n "$ac_ct_CC" && break
3864done
Michael W. Hudson54241132001-12-07 15:38:26 +00003865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 if test "x$ac_ct_CC" = x; then
3867 CC=""
3868 else
3869 case $cross_compiling:$ac_tool_warned in
3870yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873ac_tool_warned=yes ;;
3874esac
3875 CC=$ac_ct_CC
3876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878
3879fi
3880
3881
Matthias Kloseb9621712010-04-24 17:59:49 +00003882test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003884as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003885See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
3887# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003888$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3889set X $ac_compile
3890ac_compiler=$2
3891for ac_option in --version -v -V -qversion; do
3892 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
3899 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 if test -s conftest.err; then
3902 sed '10a\
3903... rest of stderr output deleted ...
3904 10q' conftest.err >conftest.er1
3905 cat conftest.er1 >&5
3906 fi
3907 rm -f conftest.er1 conftest.err
3908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909 test $ac_status = 0; }
3910done
Martin v. Löwis11437992002-04-12 09:54:03 +00003911
Matthias Kloseb9621712010-04-24 17:59:49 +00003912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003913/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003914
Martin v. Löwis11437992002-04-12 09:54:03 +00003915int
3916main ()
3917{
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003924ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003925# Try to create an executable without -o first, disregard a.out.
3926# It will help us diagnose broken compilers, and finding out an intuition
3927# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3929$as_echo_n "checking whether the C compiler works... " >&6; }
3930ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3931
3932# The possible output files:
3933ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935ac_rmfiles=
3936for ac_file in $ac_files
3937do
3938 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3941 esac
3942done
3943rm -f $ac_rmfiles
3944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3951$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3955 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3957# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3958# in a Makefile. We should not override ac_cv_exeext if it was cached,
3959# so that the user can short-circuit this test for compilers unknown to
3960# Autoconf.
3961for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003962do
3963 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966 ;;
3967 [ab].out )
3968 # We found the default executable, but exeext='' is most
3969 # certainly right.
3970 break;;
3971 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 then :; else
3974 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3975 fi
3976 # We set ac_cv_exeext here because the later test for it is not
3977 # safe: cross compilers may not add the suffix if given an `-o'
3978 # argument, so we may need to know it at that point already.
3979 # Even if this section looks crufty: it has the advantage of
3980 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 break;;
3982 * )
3983 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 esac
3985done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986test "$ac_cv_exeext" = no && ac_cv_exeext=
3987
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003988else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 ac_file=''
3990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003991if test -z "$ac_file"; then :
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3993$as_echo "no" >&6; }
3994$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003995sed 's/^/| /' conftest.$ac_ext >&5
3996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003999as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004000See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004001else
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4003$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4006$as_echo_n "checking for C compiler default output file name... " >&6; }
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4008$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
Matthias Kloseb9621712010-04-24 17:59:49 +00004011rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4014$as_echo_n "checking for suffix of executables... " >&6; }
4015if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4027# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4028# work properly (i.e., refer to `conftest.exe'), while it won't with
4029# `rm'.
4030for ac_file in conftest.exe conftest conftest.*; do
4031 test -f "$ac_file" || continue
4032 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4035 break;;
4036 * ) break;;
4037 esac
4038done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039else
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004042as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004043See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004045rm -f conftest conftest$ac_cv_exeext
4046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4047$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004048
4049rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004050EXEEXT=$ac_cv_exeext
4051ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4053/* end confdefs.h. */
4054#include <stdio.h>
4055int
4056main ()
4057{
4058FILE *f = fopen ("conftest.out", "w");
4059 return ferror (f) || fclose (f) != 0;
4060
4061 ;
4062 return 0;
4063}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004065ac_clean_files="$ac_clean_files conftest.out"
4066# Check that the compiler produces executables we can run. If not, either
4067# the compiler is broken, or we cross compile.
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4069$as_echo_n "checking whether we are cross compiling... " >&6; }
4070if test "$cross_compiling" != yes; then
4071 { { ac_try="$ac_link"
4072case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_link") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }
4082 if { ac_try='./conftest$ac_cv_exeext'
4083 { { case "(($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_try") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }; }; then
4093 cross_compiling=no
4094 else
4095 if test "$cross_compiling" = maybe; then
4096 cross_compiling=yes
4097 else
4098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004100as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004101If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004102See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 fi
4104 fi
4105fi
4106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4107$as_echo "$cross_compiling" >&6; }
4108
4109rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4110ac_clean_files=$ac_clean_files_save
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4112$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004113if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
4115else
4116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117/* end confdefs.h. */
4118
4119int
4120main ()
4121{
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004128if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129case "(($ac_try" in
4130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4131 *) ac_try_echo=$ac_try;;
4132esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4134$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4138 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139 for ac_file in conftest.o conftest.obj conftest.*; do
4140 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4144 break;;
4145 esac
4146done
4147else
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004149sed 's/^/| /' conftest.$ac_ext >&5
4150
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004153as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004154See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004156rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4159$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160OBJEXT=$ac_cv_objext
4161ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4163$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004164if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004169
Martin v. Löwis11437992002-04-12 09:54:03 +00004170int
4171main ()
4172{
4173#ifndef __GNUC__
4174 choke me
4175#endif
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 ac_compiler_gnu=yes
4183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_cv_c_compiler_gnu=$ac_compiler_gnu
4188
4189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4191$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4192if test $ac_compiler_gnu = yes; then
4193 GCC=yes
4194else
4195 GCC=
4196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004197ac_test_CFLAGS=${CFLAGS+set}
4198ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4200$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004201if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004203else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204 ac_save_c_werror_flag=$ac_c_werror_flag
4205 ac_c_werror_flag=yes
4206 ac_cv_prog_cc_g=no
4207 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
Martin v. Löwis11437992002-04-12 09:54:03 +00004211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004220 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221else
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 CFLAGS=""
4223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224/* end confdefs.h. */
4225
4226int
4227main ()
4228{
4229
4230 ;
4231 return 0;
4232}
4233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236else
4237 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4258 ac_c_werror_flag=$ac_save_c_werror_flag
4259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4261$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264elif test $ac_cv_prog_cc_g = yes; then
4265 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004266 CFLAGS="-g -O2"
4267 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269 fi
4270else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004271 if test "$GCC" = yes; then
4272 CFLAGS="-O2"
4273 else
4274 CFLAGS=
4275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4278$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004279if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004281else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004283ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285/* end confdefs.h. */
4286#include <stdarg.h>
4287#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004288struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4290struct buf { int x; };
4291FILE * (*rcsopen) (struct buf *, struct stat *, int);
4292static char *e (p, i)
4293 char **p;
4294 int i;
4295{
4296 return p[i];
4297}
4298static char *f (char * (*g) (char **, int), char **p, ...)
4299{
4300 char *s;
4301 va_list v;
4302 va_start (v,p);
4303 s = g (p, va_arg (v,int));
4304 va_end (v);
4305 return s;
4306}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004307
4308/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4309 function prototypes and stuff, but not '\xHH' hex character constants.
4310 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4313 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4318 inside strings and character constants. */
4319#define FOO(x) 'x'
4320int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4321
Skip Montanaro6dead952003-09-25 14:50:04 +00004322int test (int i, double x);
4323struct s1 {int (*f) (int a);};
4324struct s2 {int (*f) (double a);};
4325int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4326int argc;
4327char **argv;
4328int
4329main ()
4330{
4331return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4332 ;
4333 return 0;
4334}
4335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4337 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004338do
4339 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343rm -f core conftest.err conftest.$ac_objext
4344 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004347CC=$ac_save_CC
4348
4349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350# AC_CACHE_VAL
4351case "x$ac_cv_prog_cc_c89" in
4352 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4354$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4357$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004358 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4361$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004362esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004363if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Matthias Kloseb9621712010-04-24 17:59:49 +00004365fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004366
Martin v. Löwis11437992002-04-12 09:54:03 +00004367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4379$as_echo_n "checking how to run the C preprocessor... " >&6; }
4380# On Suns, sometimes $CPP names a directory.
4381if test -n "$CPP" && test -d "$CPP"; then
4382 CPP=
4383fi
4384if test -z "$CPP"; then
4385 if ${ac_cv_prog_CPP+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 # Double quotes because CPP needs to be expanded
4389 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4390 do
4391 ac_preproc_ok=false
4392for ac_c_preproc_warn_flag in '' yes
4393do
4394 # Use a header file that comes with gcc, so configuring glibc
4395 # with a fresh cross-compiler works.
4396 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4397 # <limits.h> exists even on freestanding compilers.
4398 # On the NeXT, cc -E runs the code through the compiler's parser,
4399 # not just through cpp. "Syntax error" is here to catch this case.
4400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h. */
4402#ifdef __STDC__
4403# include <limits.h>
4404#else
4405# include <assert.h>
4406#endif
4407 Syntax error
4408_ACEOF
4409if ac_fn_c_try_cpp "$LINENO"; then :
4410
4411else
4412 # Broken: fails on valid input.
4413continue
4414fi
4415rm -f conftest.err conftest.i conftest.$ac_ext
4416
4417 # OK, works on sane cases. Now check whether nonexistent headers
4418 # can be detected and how.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
4421#include <ac_nonexistent.h>
4422_ACEOF
4423if ac_fn_c_try_cpp "$LINENO"; then :
4424 # Broken: success on invalid input.
4425continue
4426else
4427 # Passes both tests.
4428ac_preproc_ok=:
4429break
4430fi
4431rm -f conftest.err conftest.i conftest.$ac_ext
4432
4433done
4434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4435rm -f conftest.i conftest.err conftest.$ac_ext
4436if $ac_preproc_ok; then :
4437 break
4438fi
4439
4440 done
4441 ac_cv_prog_CPP=$CPP
4442
4443fi
4444 CPP=$ac_cv_prog_CPP
4445else
4446 ac_cv_prog_CPP=$CPP
4447fi
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4449$as_echo "$CPP" >&6; }
4450ac_preproc_ok=false
4451for ac_c_preproc_warn_flag in '' yes
4452do
4453 # Use a header file that comes with gcc, so configuring glibc
4454 # with a fresh cross-compiler works.
4455 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4456 # <limits.h> exists even on freestanding compilers.
4457 # On the NeXT, cc -E runs the code through the compiler's parser,
4458 # not just through cpp. "Syntax error" is here to catch this case.
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461#ifdef __STDC__
4462# include <limits.h>
4463#else
4464# include <assert.h>
4465#endif
4466 Syntax error
4467_ACEOF
4468if ac_fn_c_try_cpp "$LINENO"; then :
4469
4470else
4471 # Broken: fails on valid input.
4472continue
4473fi
4474rm -f conftest.err conftest.i conftest.$ac_ext
4475
4476 # OK, works on sane cases. Now check whether nonexistent headers
4477 # can be detected and how.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
4480#include <ac_nonexistent.h>
4481_ACEOF
4482if ac_fn_c_try_cpp "$LINENO"; then :
4483 # Broken: success on invalid input.
4484continue
4485else
4486 # Passes both tests.
4487ac_preproc_ok=:
4488break
4489fi
4490rm -f conftest.err conftest.i conftest.$ac_ext
4491
4492done
4493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4494rm -f conftest.i conftest.err conftest.$ac_ext
4495if $ac_preproc_ok; then :
4496
4497else
4498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4500as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4501See \`config.log' for more details" "$LINENO" 5; }
4502fi
4503
4504ac_ext=c
4505ac_cpp='$CPP $CPPFLAGS'
4506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4508ac_compiler_gnu=$ac_cv_c_compiler_gnu
4509
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4511$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4512if ${ac_cv_path_GREP+:} false; then :
4513 $as_echo_n "(cached) " >&6
4514else
4515 if test -z "$GREP"; then
4516 ac_path_GREP_found=false
4517 # Loop through the user's path and test for each of PROGNAME-LIST
4518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4520do
4521 IFS=$as_save_IFS
4522 test -z "$as_dir" && as_dir=.
4523 for ac_prog in grep ggrep; do
4524 for ac_exec_ext in '' $ac_executable_extensions; do
4525 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4526 as_fn_executable_p "$ac_path_GREP" || continue
4527# Check for GNU ac_path_GREP and select it if it is found.
4528 # Check for GNU $ac_path_GREP
4529case `"$ac_path_GREP" --version 2>&1` in
4530*GNU*)
4531 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4532*)
4533 ac_count=0
4534 $as_echo_n 0123456789 >"conftest.in"
4535 while :
4536 do
4537 cat "conftest.in" "conftest.in" >"conftest.tmp"
4538 mv "conftest.tmp" "conftest.in"
4539 cp "conftest.in" "conftest.nl"
4540 $as_echo 'GREP' >> "conftest.nl"
4541 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4542 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4543 as_fn_arith $ac_count + 1 && ac_count=$as_val
4544 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4545 # Best one so far, save it but keep looking for a better one
4546 ac_cv_path_GREP="$ac_path_GREP"
4547 ac_path_GREP_max=$ac_count
4548 fi
4549 # 10*(2^10) chars as input seems more than enough
4550 test $ac_count -gt 10 && break
4551 done
4552 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4553esac
4554
4555 $ac_path_GREP_found && break 3
4556 done
4557 done
4558 done
4559IFS=$as_save_IFS
4560 if test -z "$ac_cv_path_GREP"; then
4561 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4562 fi
4563else
4564 ac_cv_path_GREP=$GREP
4565fi
4566
4567fi
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4569$as_echo "$ac_cv_path_GREP" >&6; }
4570 GREP="$ac_cv_path_GREP"
4571
4572
Łukasz Langaa785c872016-09-09 17:37:37 -07004573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4574$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4575if ${ac_cv_path_SED+:} false; then :
4576 $as_echo_n "(cached) " >&6
4577else
4578 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4579 for ac_i in 1 2 3 4 5 6 7; do
4580 ac_script="$ac_script$as_nl$ac_script"
4581 done
4582 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4583 { ac_script=; unset ac_script;}
4584 if test -z "$SED"; then
4585 ac_path_SED_found=false
4586 # Loop through the user's path and test for each of PROGNAME-LIST
4587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588for as_dir in $PATH
4589do
4590 IFS=$as_save_IFS
4591 test -z "$as_dir" && as_dir=.
4592 for ac_prog in sed gsed; do
4593 for ac_exec_ext in '' $ac_executable_extensions; do
4594 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4595 as_fn_executable_p "$ac_path_SED" || continue
4596# Check for GNU ac_path_SED and select it if it is found.
4597 # Check for GNU $ac_path_SED
4598case `"$ac_path_SED" --version 2>&1` in
4599*GNU*)
4600 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4601*)
4602 ac_count=0
4603 $as_echo_n 0123456789 >"conftest.in"
4604 while :
4605 do
4606 cat "conftest.in" "conftest.in" >"conftest.tmp"
4607 mv "conftest.tmp" "conftest.in"
4608 cp "conftest.in" "conftest.nl"
4609 $as_echo '' >> "conftest.nl"
4610 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4611 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4612 as_fn_arith $ac_count + 1 && ac_count=$as_val
4613 if test $ac_count -gt ${ac_path_SED_max-0}; then
4614 # Best one so far, save it but keep looking for a better one
4615 ac_cv_path_SED="$ac_path_SED"
4616 ac_path_SED_max=$ac_count
4617 fi
4618 # 10*(2^10) chars as input seems more than enough
4619 test $ac_count -gt 10 && break
4620 done
4621 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4622esac
4623
4624 $ac_path_SED_found && break 3
4625 done
4626 done
4627 done
4628IFS=$as_save_IFS
4629 if test -z "$ac_cv_path_SED"; then
4630 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4631 fi
4632else
4633 ac_cv_path_SED=$SED
4634fi
4635
4636fi
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4638$as_echo "$ac_cv_path_SED" >&6; }
4639 SED="$ac_cv_path_SED"
4640 rm -f conftest.sed
4641
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004642
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004643
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4646$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004648# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004649if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652 case $withval in
4653 no) with_cxx_main=no
4654 MAINCC='$(CC)';;
4655 yes) with_cxx_main=yes
4656 MAINCC='$(CXX)';;
4657 *) with_cxx_main=yes
4658 MAINCC=$withval
4659 if test -z "$CXX"
4660 then
4661 CXX=$withval
4662 fi;;
4663 esac
4664else
4665
4666 with_cxx_main=no
4667 MAINCC='$(CC)'
4668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669fi
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4672$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673
4674preset_cxx="$CXX"
4675if test -z "$CXX"
4676then
4677 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 gcc) if test -n "$ac_tool_prefix"; then
4679 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4680set dummy ${ac_tool_prefix}g++; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_CXX+:} false; then :
4684 $as_echo_n "(cached) " >&6
4685else
4686 case $CXX in
4687 [\\/]* | ?:[\\/]*)
4688 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4689 ;;
4690 *)
4691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in notfound
4693do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
4696 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700 break 2
4701 fi
4702done
4703 done
4704IFS=$as_save_IFS
4705
4706 ;;
4707esac
4708fi
4709CXX=$ac_cv_path_CXX
4710if test -n "$CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4712$as_echo "$CXX" >&6; }
4713else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719fi
4720if test -z "$ac_cv_path_CXX"; then
4721 ac_pt_CXX=$CXX
4722 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726if ${ac_cv_path_ac_pt_CXX+:} false; then :
4727 $as_echo_n "(cached) " >&6
4728else
4729 case $ac_pt_CXX in
4730 [\\/]* | ?:[\\/]*)
4731 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4732 ;;
4733 *)
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in notfound
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
4739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004741 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4743 break 2
4744 fi
4745done
4746 done
4747IFS=$as_save_IFS
4748
4749 ;;
4750esac
4751fi
4752ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4753if test -n "$ac_pt_CXX"; then
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4755$as_echo "$ac_pt_CXX" >&6; }
4756else
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
4759fi
4760
4761 if test "x$ac_pt_CXX" = x; then
4762 CXX="g++"
4763 else
4764 case $cross_compiling:$ac_tool_warned in
4765yes:)
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4768ac_tool_warned=yes ;;
4769esac
4770 CXX=$ac_pt_CXX
4771 fi
4772else
4773 CXX="$ac_cv_path_CXX"
4774fi
4775 ;;
4776 cc) if test -n "$ac_tool_prefix"; then
4777 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4778set dummy ${ac_tool_prefix}c++; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004781if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783else
4784 case $CXX in
4785 [\\/]* | ?:[\\/]*)
4786 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4787 ;;
4788 *)
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in notfound
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 break 2
4799 fi
4800done
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ;;
4805esac
4806fi
4807CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4810$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811else
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004815
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816
4817fi
4818if test -z "$ac_cv_path_CXX"; then
4819 ac_pt_CXX=$CXX
4820 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 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 +00004830 ;;
4831 *)
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in notfound
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841 break 2
4842 fi
4843done
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004845IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 ;;
4848esac
4849fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004850ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4851if test -n "$ac_pt_CXX"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4853$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004854else
Matthias Kloseb9621712010-04-24 17:59:49 +00004855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004858
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 if test "x$ac_pt_CXX" = x; then
4860 CXX="c++"
4861 else
4862 case $cross_compiling:$ac_tool_warned in
4863yes:)
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4866ac_tool_warned=yes ;;
4867esac
4868 CXX=$ac_pt_CXX
4869 fi
4870else
4871 CXX="$ac_cv_path_CXX"
4872fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004873 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 clang|*/clang) if test -n "$ac_tool_prefix"; then
4875 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4876set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878$as_echo_n "checking for $ac_word... " >&6; }
4879if ${ac_cv_path_CXX+:} false; then :
4880 $as_echo_n "(cached) " >&6
4881else
4882 case $CXX in
4883 [\\/]* | ?:[\\/]*)
4884 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4885 ;;
4886 *)
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in notfound
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
4892 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004894 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4896 break 2
4897 fi
4898done
4899 done
4900IFS=$as_save_IFS
4901
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ;;
4903esac
4904fi
4905CXX=$ac_cv_path_CXX
4906if test -n "$CXX"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4908$as_echo "$CXX" >&6; }
4909else
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
4912fi
4913
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004914
4915fi
4916if test -z "$ac_cv_path_CXX"; then
4917 ac_pt_CXX=$CXX
4918 # Extract the first word of "clang++", so it can be a program name with args.
4919set dummy clang++; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_ac_pt_CXX+:} false; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 case $ac_pt_CXX in
4926 [\\/]* | ?:[\\/]*)
4927 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4928 ;;
4929 *)
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in notfound
4932do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004937 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941done
4942 done
4943IFS=$as_save_IFS
4944
4945 ;;
4946esac
4947fi
4948ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4949if test -n "$ac_pt_CXX"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4951$as_echo "$ac_pt_CXX" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957 if test "x$ac_pt_CXX" = x; then
4958 CXX="clang++"
4959 else
4960 case $cross_compiling:$ac_tool_warned in
4961yes:)
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4964ac_tool_warned=yes ;;
4965esac
4966 CXX=$ac_pt_CXX
4967 fi
4968else
4969 CXX="$ac_cv_path_CXX"
4970fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004971 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004972 icc|*/icc) if test -n "$ac_tool_prefix"; then
4973 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4974set dummy ${ac_tool_prefix}icpc; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_CXX+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979else
4980 case $CXX in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in notfound
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
4991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4992 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997 done
4998IFS=$as_save_IFS
4999
5000 ;;
5001esac
5002fi
5003CXX=$ac_cv_path_CXX
5004if test -n "$CXX"; then
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5006$as_echo "$CXX" >&6; }
5007else
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013fi
5014if test -z "$ac_cv_path_CXX"; then
5015 ac_pt_CXX=$CXX
5016 # Extract the first word of "icpc", so it can be a program name with args.
5017set dummy icpc; ac_word=$2
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; }
5020if ${ac_cv_path_ac_pt_CXX+:} false; then :
5021 $as_echo_n "(cached) " >&6
5022else
5023 case $ac_pt_CXX in
5024 [\\/]* | ?:[\\/]*)
5025 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5026 ;;
5027 *)
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in notfound
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5035 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2
5038 fi
5039done
5040 done
5041IFS=$as_save_IFS
5042
5043 ;;
5044esac
5045fi
5046ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5047if test -n "$ac_pt_CXX"; then
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5049$as_echo "$ac_pt_CXX" >&6; }
5050else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
5053fi
5054
5055 if test "x$ac_pt_CXX" = x; then
5056 CXX="icpc"
5057 else
5058 case $cross_compiling:$ac_tool_warned in
5059yes:)
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5062ac_tool_warned=yes ;;
5063esac
5064 CXX=$ac_pt_CXX
5065 fi
5066else
5067 CXX="$ac_cv_path_CXX"
5068fi
5069 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005070 esac
5071 if test "$CXX" = "notfound"
5072 then
5073 CXX=""
5074 fi
5075fi
5076if test -z "$CXX"
5077then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005078 if test -n "$ac_tool_prefix"; then
5079 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5080 do
5081 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5082set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087else
5088 if test -n "$CXX"; then
5089 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5090else
5091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005100 break 2
5101 fi
5102done
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105
5106fi
5107fi
5108CXX=$ac_cv_prog_CXX
5109if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5111$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112else
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115fi
5116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005118 test -n "$CXX" && break
5119 done
5120fi
5121if test -z "$CXX"; then
5122 ac_ct_CXX=$CXX
5123 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5124do
5125 # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131else
5132 if test -n "$ac_ct_CXX"; then
5133 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5134else
5135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138 IFS=$as_save_IFS
5139 test -z "$as_dir" && as_dir=.
5140 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005142 ac_cv_prog_ac_ct_CXX="$ac_prog"
5143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144 break 2
5145 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005147 done
5148IFS=$as_save_IFS
5149
5150fi
5151fi
5152ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5153if test -n "$ac_ct_CXX"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5155$as_echo "$ac_ct_CXX" >&6; }
5156else
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162 test -n "$ac_ct_CXX" && break
5163done
5164
5165 if test "x$ac_ct_CXX" = x; then
5166 CXX="notfound"
5167 else
5168 case $cross_compiling:$ac_tool_warned in
5169yes:)
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5172ac_tool_warned=yes ;;
5173esac
5174 CXX=$ac_ct_CXX
5175 fi
5176fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177
5178 if test "$CXX" = "notfound"
5179 then
5180 CXX=""
5181 fi
5182fi
5183if test "$preset_cxx" != "$CXX"
5184then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005185 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005186
5187 By default, distutils will build C++ extension modules with \"$CXX\".
5188 If this is not intended, then set CXX on the configure command line.
5189 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005190$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005191
5192 By default, distutils will build C++ extension modules with \"$CXX\".
5193 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005194 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005195fi
5196
5197
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005198MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5199
5200
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5202$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5203cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005204#undef bfin
5205#undef cris
5206#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005208#undef hppa
5209#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005212#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005215#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005216 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005217#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218# if defined(__x86_64__) && defined(__LP64__)
5219 x86_64-linux-gnu
5220# elif defined(__x86_64__) && defined(__ILP32__)
5221 x86_64-linux-gnux32
5222# elif defined(__i386__)
5223 i386-linux-gnu
5224# elif defined(__aarch64__) && defined(__AARCH64EL__)
5225# if defined(__ILP32__)
5226 aarch64_ilp32-linux-gnu
5227# else
5228 aarch64-linux-gnu
5229# endif
5230# elif defined(__aarch64__) && defined(__AARCH64EB__)
5231# if defined(__ILP32__)
5232 aarch64_be_ilp32-linux-gnu
5233# else
5234 aarch64_be-linux-gnu
5235# endif
5236# elif defined(__alpha__)
5237 alpha-linux-gnu
5238# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5239# if defined(__ARMEL__)
5240 arm-linux-gnueabihf
5241# else
5242 armeb-linux-gnueabihf
5243# endif
5244# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5245# if defined(__ARMEL__)
5246 arm-linux-gnueabi
5247# else
5248 armeb-linux-gnueabi
5249# endif
5250# elif defined(__hppa__)
5251 hppa-linux-gnu
5252# elif defined(__ia64__)
5253 ia64-linux-gnu
5254# elif defined(__m68k__) && !defined(__mcoldfire__)
5255 m68k-linux-gnu
5256# elif defined(__mips_hard_float) && defined(_MIPSEL)
5257# if _MIPS_SIM == _ABIO32
5258 mipsel-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mips64el-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mips64el-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
5266# elif defined(__mips_hard_float)
5267# if _MIPS_SIM == _ABIO32
5268 mips-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mips64-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mips64-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
5276# elif defined(__or1k__)
5277 or1k-linux-gnu
5278# elif defined(__powerpc__) && defined(__SPE__)
5279 powerpc-linux-gnuspe
5280# elif defined(__powerpc64__)
5281# if defined(__LITTLE_ENDIAN__)
5282 powerpc64le-linux-gnu
5283# else
5284 powerpc64-linux-gnu
5285# endif
5286# elif defined(__powerpc__)
5287 powerpc-linux-gnu
5288# elif defined(__s390x__)
5289 s390x-linux-gnu
5290# elif defined(__s390__)
5291 s390-linux-gnu
5292# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5293 sh4-linux-gnu
5294# elif defined(__sparc__) && defined(__arch64__)
5295 sparc64-linux-gnu
5296# elif defined(__sparc__)
5297 sparc-linux-gnu
5298# else
5299# error unknown platform triplet
5300# endif
5301#elif defined(__FreeBSD_kernel__)
5302# if defined(__LP64__)
5303 x86_64-kfreebsd-gnu
5304# elif defined(__i386__)
5305 i386-kfreebsd-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__gnu_hurd__)
5310 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005311#elif defined(__APPLE__)
5312 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313#else
5314# error unknown platform triplet
5315#endif
5316
5317EOF
5318
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005319if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5322$as_echo "$PLATFORM_TRIPLET" >&6; }
5323else
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5325$as_echo "none" >&6; }
5326fi
5327rm -f conftest.c conftest.out
5328
5329if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5330 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5331 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5332 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005333elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5334 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005335fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005336
doko@ubuntu.com55532312016-06-14 08:55:19 +02005337if test x$MULTIARCH != x; then
5338 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5339fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340
5341
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5343$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5344save_LDFLAGS="$LDFLAGS"
5345LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005346
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5348/* end confdefs.h. */
5349
5350int
5351main ()
5352{
5353
5354 ;
5355 return 0;
5356}
5357_ACEOF
5358if ac_fn_c_try_link "$LINENO"; then :
5359 NO_AS_NEEDED="-Wl,--no-as-needed"
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5361$as_echo "yes" >&6; }
5362else
5363 NO_AS_NEEDED=""
5364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5365$as_echo "no" >&6; }
5366fi
5367rm -f core conftest.err conftest.$ac_objext \
5368 conftest$ac_exeext conftest.$ac_ext
5369LDFLAGS="$save_LDFLAGS"
5370
5371
5372
5373# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5376$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005377if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379else
5380 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5381 then ac_cv_path_EGREP="$GREP -E"
5382 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 # Loop through the user's path and test for each of PROGNAME-LIST
5386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5388do
5389 IFS=$as_save_IFS
5390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 for ac_prog in egrep; do
5392 for ac_exec_ext in '' $ac_executable_extensions; do
5393 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005394 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005395# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 # Check for GNU $ac_path_EGREP
5397case `"$ac_path_EGREP" --version 2>&1` in
5398*GNU*)
5399 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5400*)
5401 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 while :
5404 do
5405 cat "conftest.in" "conftest.in" >"conftest.tmp"
5406 mv "conftest.tmp" "conftest.in"
5407 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5410 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5413 # Best one so far, save it but keep looking for a better one
5414 ac_cv_path_EGREP="$ac_path_EGREP"
5415 ac_path_EGREP_max=$ac_count
5416 fi
5417 # 10*(2^10) chars as input seems more than enough
5418 test $ac_count -gt 10 && break
5419 done
5420 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5421esac
5422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 $ac_path_EGREP_found && break 3
5424 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005429 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 +00005430 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431else
5432 ac_cv_path_EGREP=$EGREP
5433fi
5434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 fi
5436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5438$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005440
5441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5443$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005444if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 $as_echo_n "(cached) " >&6
5446else
5447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005448/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005449#include <stdlib.h>
5450#include <stdarg.h>
5451#include <string.h>
5452#include <float.h>
5453
5454int
5455main ()
5456{
5457
5458 ;
5459 return 0;
5460}
5461_ACEOF
5462if ac_fn_c_try_compile "$LINENO"; then :
5463 ac_cv_header_stdc=yes
5464else
5465 ac_cv_header_stdc=no
5466fi
5467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5468
5469if test $ac_cv_header_stdc = yes; then
5470 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5472/* end confdefs.h. */
5473#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005474
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005475_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005478
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005479else
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005481fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005482rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483
Matthias Kloseb9621712010-04-24 17:59:49 +00005484fi
5485
5486if test $ac_cv_header_stdc = yes; then
5487 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5489/* end confdefs.h. */
5490#include <stdlib.h>
5491
5492_ACEOF
5493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5494 $EGREP "free" >/dev/null 2>&1; then :
5495
5496else
5497 ac_cv_header_stdc=no
5498fi
5499rm -f conftest*
5500
5501fi
5502
5503if test $ac_cv_header_stdc = yes; then
5504 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5505 if test "$cross_compiling" = yes; then :
5506 :
5507else
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#include <ctype.h>
5511#include <stdlib.h>
5512#if ((' ' & 0x0FF) == 0x020)
5513# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5514# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5515#else
5516# define ISLOWER(c) \
5517 (('a' <= (c) && (c) <= 'i') \
5518 || ('j' <= (c) && (c) <= 'r') \
5519 || ('s' <= (c) && (c) <= 'z'))
5520# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5521#endif
5522
5523#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5524int
5525main ()
5526{
5527 int i;
5528 for (i = 0; i < 256; i++)
5529 if (XOR (islower (i), ISLOWER (i))
5530 || toupper (i) != TOUPPER (i))
5531 return 2;
5532 return 0;
5533}
5534_ACEOF
5535if ac_fn_c_try_run "$LINENO"; then :
5536
5537else
5538 ac_cv_header_stdc=no
5539fi
5540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5541 conftest.$ac_objext conftest.beam conftest.$ac_ext
5542fi
5543
5544fi
5545fi
5546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5547$as_echo "$ac_cv_header_stdc" >&6; }
5548if test $ac_cv_header_stdc = yes; then
5549
5550$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5551
5552fi
5553
5554# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5555for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5556 inttypes.h stdint.h unistd.h
5557do :
5558 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5559ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5560"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005561if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 cat >>confdefs.h <<_ACEOF
5563#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5564_ACEOF
5565
5566fi
5567
5568done
5569
5570
5571
5572 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 +02005573if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 MINIX=yes
5575else
5576 MINIX=
5577fi
5578
5579
5580 if test "$MINIX" = yes; then
5581
5582$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5583
5584
5585$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5586
5587
5588$as_echo "#define _MINIX 1" >>confdefs.h
5589
5590 fi
5591
5592
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5594$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005595if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 $as_echo_n "(cached) " >&6
5597else
5598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5599/* end confdefs.h. */
5600
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005601# define __EXTENSIONS__ 1
5602 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005603int
5604main ()
5605{
5606
5607 ;
5608 return 0;
5609}
5610_ACEOF
5611if ac_fn_c_try_compile "$LINENO"; then :
5612 ac_cv_safe_to_define___extensions__=yes
5613else
5614 ac_cv_safe_to_define___extensions__=no
5615fi
5616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5617fi
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5619$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5620 test $ac_cv_safe_to_define___extensions__ = yes &&
5621 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5622
5623 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5624
5625 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5626
5627 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5628
5629 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5630
5631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5634$as_echo_n "checking for the Android API level... " >&6; }
5635cat >> conftest.c <<EOF
5636#ifdef __ANDROID__
5637#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005638android_api = __ANDROID_API__
5639arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005640#else
5641#error not Android
5642#endif
5643EOF
5644
5645if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005646 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5647 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5649$as_echo "$ANDROID_API_LEVEL" >&6; }
5650
5651cat >>confdefs.h <<_ACEOF
5652#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5653_ACEOF
5654
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005655
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5657$as_echo_n "checking for the Android arm ABI... " >&6; }
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5659$as_echo "$_arm_arch" >&6; }
5660 if test "$_arm_arch" = 7; then
5661 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5662 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5663 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005664else
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5666$as_echo "not Android" >&6; }
5667fi
5668rm -f conftest.c conftest.out
5669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670# Check for unsupported systems
5671case $ac_sys_system/$ac_sys_release in
5672atheos*|Linux*/1*)
5673 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5674 echo See README for details.
5675 exit 1;;
5676esac
5677
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5680$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005683if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 withval=$with_suffix;
5685 case $withval in
5686 no) EXEEXT=;;
5687 yes) EXEEXT=.exe;;
5688 *) EXEEXT=$withval;;
5689 esac
5690fi
5691
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5693$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694
5695# Test whether we're running on a non-case-sensitive system, in which
5696# case we give a warning if no ext is given
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5699$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700if test ! -d CaseSensitiveTestDir; then
5701mkdir CaseSensitiveTestDir
5702fi
5703
5704if test -d casesensitivetestdir
5705then
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5707$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 BUILDEXEEXT=.exe
5709else
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 BUILDEXEEXT=$EXEEXT
5713fi
5714rmdir CaseSensitiveTestDir
5715
5716case $MACHDEP in
5717bsdos*)
5718 case $CC in
5719 gcc) CC="$CC -D_HAVE_BSDI";;
5720 esac;;
5721esac
5722
5723case $ac_sys_system in
5724hp*|HP*)
5725 case $CC in
5726 cc|*/cc) CC="$CC -Ae";;
5727 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728esac
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
Matthias Kloseb9621712010-04-24 17:59:49 +00005731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5732$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733if test -z "$LIBRARY"
5734then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005735 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5738$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740# LDLIBRARY is the name of the library to link against (as opposed to the
5741# name of the library into which to insert object files). BLDLIBRARY is also
5742# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5743# is blank as the main program is not linked directly against LDLIBRARY.
5744# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5745# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5746# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5747# DLLLIBRARY is the shared (i.e., DLL) library.
5748#
5749# RUNSHARED is used to run shared python without installed libraries
5750#
5751# INSTSONAME is the name of the shared library that will be use to install
5752# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005753#
5754# LDVERSION is the shared library version number, normally the Python version
5755# with the ABI build flags appended.
5756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757
5758
5759
5760
5761
5762
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764LDLIBRARY="$LIBRARY"
5765BLDLIBRARY='$(LDLIBRARY)'
5766INSTSONAME='$(LDLIBRARY)'
5767DLLLIBRARY=''
5768LDLIBRARYDIR=''
5769RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005770LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
5772# LINKCC is the command that links the python executable -- default is $(CC).
5773# If CXX is set, and if it is needed to link a main function that was
5774# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5775# python might then depend on the C++ runtime
5776# This is altered for AIX in order to build the export list before
5777# linking.
5778
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5780$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781if test -z "$LINKCC"
5782then
5783 LINKCC='$(PURIFY) $(MAINCC)'
5784 case $ac_sys_system in
5785 AIX*)
5786 exp_extra="\"\""
5787 if test $ac_sys_release -ge 5 -o \
5788 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5789 exp_extra="."
5790 fi
5791 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 QNX*)
5793 # qcc must be used because the other compilers do not
5794 # support -N.
5795 LINKCC=qcc;;
5796 esac
5797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5799$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800
5801# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5802# make sure we default having it set to "no": this is used by
5803# distutils.unixccompiler to know if it should add --enable-new-dtags
5804# to linker command lines, and failing to detect GNU ld simply results
5805# in the same bahaviour as before.
5806
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5808$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809ac_prog=ld
5810if test "$GCC" = yes; then
5811 ac_prog=`$CC -print-prog-name=ld`
5812fi
5813case `"$ac_prog" -V 2>&1 < /dev/null` in
5814 *GNU*)
5815 GNULD=yes;;
5816 *)
5817 GNULD=no;;
5818esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5820$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5823$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005825if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826 enableval=$enable_shared;
5827fi
5828
5829
5830if test -z "$enable_shared"
5831then
5832 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005833 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834 enable_shared="yes";;
5835 *)
5836 enable_shared="no";;
5837 esac
5838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5840$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5843$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846 enableval=$enable_profiling;
5847fi
5848
5849if test "x$enable_profiling" = xyes; then
5850 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005851 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853/* end confdefs.h. */
5854int main() { return 0; }
5855_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005856if ac_fn_c_try_link "$LINENO"; then :
5857
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005859 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005861rm -f core conftest.err conftest.$ac_objext \
5862 conftest$ac_exeext conftest.$ac_ext
5863 CC="$ac_save_cc"
5864else
5865 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5868$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870if test "x$enable_profiling" = xyes; then
5871 BASECFLAGS="-pg $BASECFLAGS"
5872 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
5874
Matthias Kloseb9621712010-04-24 17:59:49 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5876$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877
5878# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5879# library that we build, but we do not want to link against it (we
5880# will find it with a -framework option). For this reason there is an
5881# extra variable BLDLIBRARY against which Python and the extension
5882# modules are linked, BLDLIBRARY. This is normally the same as
5883# LDLIBRARY, but empty for MacOSX framework builds.
5884if test "$enable_framework"
5885then
5886 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005887 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 BLDLIBRARY=''
5889else
5890 BLDLIBRARY='$(LDLIBRARY)'
5891fi
5892
5893# Other platforms follow
5894if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005895 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
Matthias Kloseb9621712010-04-24 17:59:49 +00005897$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898
5899 case $ac_sys_system in
5900 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005901 LDLIBRARY='libpython$(LDVERSION).dll.a'
5902 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
5904 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).so'
5906 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005909 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005910 then
5911 PY3LIBRARY=libpython3.so
5912 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005914 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
5916 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005919 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005920 then
5921 PY3LIBRARY=libpython3.so
5922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 hp*|HP*)
5925 case `uname -m` in
5926 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 ;;
5932 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005933 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005934 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).dylib'
5938 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005939 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005941 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
5946 esac
5947else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005948 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 case $ac_sys_system in
5950 CYGWIN*)
5951 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
5954 esac
5955fi
5956
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005957if test "$cross_compiling" = yes; then
5958 RUNSHARED=
5959fi
5960
Matthias Kloseb9621712010-04-24 17:59:49 +00005961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5962$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963
5964if test -n "$ac_tool_prefix"; then
5965 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5966set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005969if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971else
5972 if test -n "$RANLIB"; then
5973 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5974else
5975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976for as_dir in $PATH
5977do
5978 IFS=$as_save_IFS
5979 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 break 2
5985 fi
5986done
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988IFS=$as_save_IFS
5989
5990fi
5991fi
5992RANLIB=$ac_cv_prog_RANLIB
5993if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5995$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996else
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999fi
6000
6001
6002fi
6003if test -z "$ac_cv_prog_RANLIB"; then
6004 ac_ct_RANLIB=$RANLIB
6005 # Extract the first word of "ranlib", so it can be a program name with args.
6006set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006009if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011else
6012 if test -n "$ac_ct_RANLIB"; then
6013 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6014else
6015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016for as_dir in $PATH
6017do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024 break 2
6025 fi
6026done
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028IFS=$as_save_IFS
6029
6030fi
6031fi
6032ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6033if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6035$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036else
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039fi
6040
6041 if test "x$ac_ct_RANLIB" = x; then
6042 RANLIB=":"
6043 else
6044 case $cross_compiling:$ac_tool_warned in
6045yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048ac_tool_warned=yes ;;
6049esac
6050 RANLIB=$ac_ct_RANLIB
6051 fi
6052else
6053 RANLIB="$ac_cv_prog_RANLIB"
6054fi
6055
6056
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006057if test -n "$ac_tool_prefix"; then
6058 for ac_prog in ar aal
6059 do
6060 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6061set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6063$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006064if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066else
6067 if test -n "$AR"; then
6068 ac_cv_prog_AR="$AR" # Let the user override the test.
6069else
6070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6071for as_dir in $PATH
6072do
6073 IFS=$as_save_IFS
6074 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006077 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079 break 2
6080 fi
6081done
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083IFS=$as_save_IFS
6084
6085fi
6086fi
6087AR=$ac_cv_prog_AR
6088if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6090$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091else
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094fi
6095
6096
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006097 test -n "$AR" && break
6098 done
6099fi
6100if test -z "$AR"; then
6101 ac_ct_AR=$AR
6102 for ac_prog in ar aal
6103do
6104 # Extract the first word of "$ac_prog", so it can be a program name with args.
6105set dummy $ac_prog; ac_word=$2
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107$as_echo_n "checking for $ac_word... " >&6; }
6108if ${ac_cv_prog_ac_ct_AR+:} false; then :
6109 $as_echo_n "(cached) " >&6
6110else
6111 if test -n "$ac_ct_AR"; then
6112 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6113else
6114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115for as_dir in $PATH
6116do
6117 IFS=$as_save_IFS
6118 test -z "$as_dir" && as_dir=.
6119 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006120 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006121 ac_cv_prog_ac_ct_AR="$ac_prog"
6122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6123 break 2
6124 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006126 done
6127IFS=$as_save_IFS
6128
6129fi
6130fi
6131ac_ct_AR=$ac_cv_prog_ac_ct_AR
6132if test -n "$ac_ct_AR"; then
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6134$as_echo "$ac_ct_AR" >&6; }
6135else
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6137$as_echo "no" >&6; }
6138fi
6139
6140
6141 test -n "$ac_ct_AR" && break
6142done
6143
6144 if test "x$ac_ct_AR" = x; then
6145 AR="ar"
6146 else
6147 case $cross_compiling:$ac_tool_warned in
6148yes:)
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6151ac_tool_warned=yes ;;
6152esac
6153 AR=$ac_ct_AR
6154 fi
6155fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156
6157
6158# tweak ARFLAGS only if the user didn't set it on the command line
6159
6160if test -z "$ARFLAGS"
6161then
6162 ARFLAGS="rc"
6163fi
6164
doko@ubuntu.com58844492012-06-30 18:25:32 +02006165if test -n "$ac_tool_prefix"; then
6166 for ac_prog in readelf
6167 do
6168 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6171$as_echo_n "checking for $ac_word... " >&6; }
6172if ${ac_cv_prog_READELF+:} false; then :
6173 $as_echo_n "(cached) " >&6
6174else
6175 if test -n "$READELF"; then
6176 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6177else
6178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6179for as_dir in $PATH
6180do
6181 IFS=$as_save_IFS
6182 test -z "$as_dir" && as_dir=.
6183 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006185 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6187 break 2
6188 fi
6189done
6190 done
6191IFS=$as_save_IFS
6192
6193fi
6194fi
6195READELF=$ac_cv_prog_READELF
6196if test -n "$READELF"; then
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6198$as_echo "$READELF" >&6; }
6199else
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201$as_echo "no" >&6; }
6202fi
6203
6204
6205 test -n "$READELF" && break
6206 done
6207fi
6208if test -z "$READELF"; then
6209 ac_ct_READELF=$READELF
6210 for ac_prog in readelf
6211do
6212 # Extract the first word of "$ac_prog", so it can be a program name with args.
6213set dummy $ac_prog; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6217 $as_echo_n "(cached) " >&6
6218else
6219 if test -n "$ac_ct_READELF"; then
6220 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6221else
6222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223for as_dir in $PATH
6224do
6225 IFS=$as_save_IFS
6226 test -z "$as_dir" && as_dir=.
6227 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006229 ac_cv_prog_ac_ct_READELF="$ac_prog"
6230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6231 break 2
6232 fi
6233done
6234 done
6235IFS=$as_save_IFS
6236
6237fi
6238fi
6239ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6240if test -n "$ac_ct_READELF"; then
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6242$as_echo "$ac_ct_READELF" >&6; }
6243else
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
6246fi
6247
6248
6249 test -n "$ac_ct_READELF" && break
6250done
6251
6252 if test "x$ac_ct_READELF" = x; then
6253 READELF=":"
6254 else
6255 case $cross_compiling:$ac_tool_warned in
6256yes:)
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6259ac_tool_warned=yes ;;
6260esac
6261 READELF=$ac_ct_READELF
6262 fi
6263fi
6264
6265if test "$cross_compiling" = yes; then
6266 case "$READELF" in
6267 readelf|:)
6268 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6269 ;;
6270 esac
6271fi
6272
6273
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275case $MACHDEP in
6276bsdos*|hp*|HP*)
6277 # install -d does not work on BSDI or HP-UX
6278 if test -z "$INSTALL"
6279 then
6280 INSTALL="${srcdir}/install-sh -c"
6281 fi
6282esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283# Find a good install program. We prefer a C program (faster),
6284# so one script is as good as another. But avoid the broken or
6285# incompatible versions:
6286# SysV /etc/install, /usr/sbin/install
6287# SunOS /usr/etc/install
6288# IRIX /sbin/install
6289# AIX /bin/install
6290# AmigaOS /C/install, which installs bootblocks on floppy discs
6291# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6292# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6293# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6294# OS/2's system install, which has a completely different semantic
6295# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006296# Reject install programs that cannot install multiple files.
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6298$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006300if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006301 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302else
6303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH
6305do
6306 IFS=$as_save_IFS
6307 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 # Account for people who put trailing slashes in PATH elements.
6309case $as_dir/ in #((
6310 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 /usr/ucb/* ) ;;
6314 *)
6315 # OSF1 and SCO ODT 3.0 have their own names for install.
6316 # Don't use installbsd from OSF since it installs stuff as root
6317 # by default.
6318 for ac_prog in ginstall scoinst install; do
6319 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006320 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 if test $ac_prog = install &&
6322 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6323 # AIX install. It has an incompatible calling convention.
6324 :
6325 elif test $ac_prog = install &&
6326 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6327 # program-specific install script used by HP pwplus--don't use.
6328 :
6329 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 rm -rf conftest.one conftest.two conftest.dir
6331 echo one > conftest.one
6332 echo two > conftest.two
6333 mkdir conftest.dir
6334 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6335 test -s conftest.one && test -s conftest.two &&
6336 test -s conftest.dir/conftest.one &&
6337 test -s conftest.dir/conftest.two
6338 then
6339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6340 break 3
6341 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 fi
6343 fi
6344 done
6345 done
6346 ;;
6347esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006348
6349 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350IFS=$as_save_IFS
6351
Matthias Kloseb9621712010-04-24 17:59:49 +00006352rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353
6354fi
6355 if test "${ac_cv_path_install+set}" = set; then
6356 INSTALL=$ac_cv_path_install
6357 else
6358 # As a last resort, use the slow shell script. Don't cache a
6359 # value for INSTALL within a source directory, because that will
6360 # break other packages using the cache if that directory is
6361 # removed, or if the value is a relative name.
6362 INSTALL=$ac_install_sh
6363 fi
6364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6366$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367
6368# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6369# It thinks the first close brace ends the variable substitution.
6370test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6371
6372test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6373
6374test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6375
Matthias Klose93a0ef12012-03-15 18:08:34 +01006376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6377$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6378if test -z "$MKDIR_P"; then
6379 if ${ac_cv_path_mkdir+:} false; then :
6380 $as_echo_n "(cached) " >&6
6381else
6382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6383for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6384do
6385 IFS=$as_save_IFS
6386 test -z "$as_dir" && as_dir=.
6387 for ac_prog in mkdir gmkdir; do
6388 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006389 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006390 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6391 'mkdir (GNU coreutils) '* | \
6392 'mkdir (coreutils) '* | \
6393 'mkdir (fileutils) '4.1*)
6394 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6395 break 3;;
6396 esac
6397 done
6398 done
6399 done
6400IFS=$as_save_IFS
6401
6402fi
6403
6404 test -d ./--version && rmdir ./--version
6405 if test "${ac_cv_path_mkdir+set}" = set; then
6406 MKDIR_P="$ac_cv_path_mkdir -p"
6407 else
6408 # As a last resort, use the slow shell script. Don't cache a
6409 # value for MKDIR_P within a source directory, because that will
6410 # break other packages using the cache if that directory is
6411 # removed, or if the value is a relative name.
6412 MKDIR_P="$ac_install_sh -d"
6413 fi
6414fi
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6416$as_echo "$MKDIR_P" >&6; }
6417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418
6419# Not every filesystem supports hard links
6420
6421if test -z "$LN" ; then
6422 case $ac_sys_system in
6423 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 *) LN=ln;;
6425 esac
6426fi
6427
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006428# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006429
6430ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6434$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435
6436# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006437if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 withval=$with_pydebug;
6439if test "$withval" != no
6440then
6441
Matthias Kloseb9621712010-04-24 17:59:49 +00006442$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6445$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006447 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006448else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450fi
6451else
Matthias Kloseb9621712010-04-24 17:59:49 +00006452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454fi
6455
6456
T. Woutersddbfa2c2017-05-23 01:30:49 +02006457# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6458# the ABI. This allows enabling assertions without changing the ABI.
6459assertions='false'
6460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6461$as_echo_n "checking for --with-assertions... " >&6; }
6462
6463# Check whether --with-assertions was given.
6464if test "${with_assertions+set}" = set; then :
6465 withval=$with_assertions;
6466if test "$withval" != no
6467then
6468 assertions='true'
6469fi
6470fi
6471
6472if test "$assertions" = 'true'; then
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6474$as_echo "yes" >&6; }
6475elif test "$Py_DEBUG" = 'true'; then
6476 assertions='true'
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6478$as_echo "implied by --with-pydebug" >&6; }
6479else
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483
Brett Cannon63d98bc2016-09-06 17:12:40 -07006484# Enable optimization flags
6485
6486
6487Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6489$as_echo_n "checking for --enable-optimizations... " >&6; }
6490# Check whether --enable-optimizations was given.
6491if test "${enable_optimizations+set}" = set; then :
6492 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006493if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006494then
6495 Py_OPT='true'
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6497$as_echo "yes" >&6; };
6498else
6499 Py_OPT='false'
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; };
6502fi
6503else
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505$as_echo "no" >&6; }
6506fi
6507
6508if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006509 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6510 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006511 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006512 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006513 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006514 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006515 DEF_MAKE_RULE="build_all"
6516else
6517 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006518 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006519 DEF_MAKE_RULE="all"
6520fi
6521
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006522# Enable LTO flags
6523
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6525$as_echo_n "checking for --with-lto... " >&6; }
6526
6527# Check whether --with-lto was given.
6528if test "${with_lto+set}" = set; then :
6529 withval=$with_lto;
6530if test "$withval" != no
6531then
6532 Py_LTO='true'
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6534$as_echo "yes" >&6; };
6535else
6536 Py_LTO='false'
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; };
6539fi
6540else
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542$as_echo "no" >&6; }
6543fi
6544
6545if test "$Py_LTO" = 'true' ; then
6546 case $CC in
6547 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006548 case $ac_sys_system in
6549 Darwin*)
6550 # Any changes made here should be reflected in the GCC+Darwin case below
6551 LTOFLAGS="-flto -Wl,-export_dynamic"
6552 ;;
6553 *)
6554 LTOFLAGS="-flto"
6555 ;;
6556 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006557 ;;
6558 *gcc*)
6559 case $ac_sys_system in
6560 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006561 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006562 ;;
6563 *)
6564 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6565 ;;
6566 esac
6567 ;;
6568 esac
6569fi
6570
Brett Cannon7188a3e2015-09-18 15:13:44 -07006571# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006572
6573
6574
6575
6576
Gregory P. Smith799520c2016-09-07 16:10:00 -07006577# Make this work on systems where llvm tools are not installed with their
6578# normal names in the default $PATH (ie: Ubuntu). They exist under the
6579# non-suffixed name in their versioned llvm directory.
6580llvm_bin_dir=''
6581llvm_path="${PATH}"
6582if test "${CC}" = "clang"
6583then
6584 clang_bin=`which clang`
6585 # Some systems install clang elsewhere as a symlink to the real path
6586 # which is where the related llvm tools are located.
6587 if test -L "${clang_bin}"
6588 then
6589 clang_dir=`dirname "${clang_bin}"`
6590 clang_bin=`readlink "${clang_bin}"`
6591 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6592 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6593 fi
6594fi
Zachary Ware5af85642015-12-21 12:09:17 -06006595
Gregory P. Smith799520c2016-09-07 16:10:00 -07006596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6597$as_echo_n "checking target system type... " >&6; }
6598if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006599 $as_echo_n "(cached) " >&6
6600else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006601 if test "x$target_alias" = x; then
6602 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006603else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006604 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6605 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6606fi
6607
6608fi
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6610$as_echo "$ac_cv_target" >&6; }
6611case $ac_cv_target in
6612*-*-*) ;;
6613*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6614esac
6615target=$ac_cv_target
6616ac_save_IFS=$IFS; IFS='-'
6617set x $ac_cv_target
6618shift
6619target_cpu=$1
6620target_vendor=$2
6621shift; shift
6622# Remember, the first character of IFS is used to create $*,
6623# except with old shells:
6624target_os=$*
6625IFS=$ac_save_IFS
6626case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6627
6628
6629# The aliases save the names the user supplied, while $host etc.
6630# will get canonicalized.
6631test -n "$target_alias" &&
6632 test "$program_prefix$program_suffix$program_transform_name" = \
6633 NONENONEs,x,x, &&
6634 program_prefix=${target_alias}-
6635# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6636set dummy $target_alias-llvm-profdata; ac_word=$2
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638$as_echo_n "checking for $ac_word... " >&6; }
6639if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6640 $as_echo_n "(cached) " >&6
6641else
6642 case $LLVM_PROFDATA in
6643 [\\/]* | ?:[\\/]*)
6644 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6645 ;;
6646 *)
6647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006649do
6650 IFS=$as_save_IFS
6651 test -z "$as_dir" && as_dir=.
6652 for ac_exec_ext in '' $ac_executable_extensions; do
6653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656 break 2
6657 fi
6658done
6659 done
6660IFS=$as_save_IFS
6661
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 ;;
6663esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006664fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006665LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6666if test -n "$LLVM_PROFDATA"; then
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6668$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006669else
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673
6674
Gregory P. Smith799520c2016-09-07 16:10:00 -07006675if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6676 if test "$build" = "$target"; then
6677 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6678 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6679set dummy llvm-profdata; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6683 $as_echo_n "(cached) " >&6
6684else
6685 case $ac_pt_LLVM_PROFDATA in
6686 [\\/]* | ?:[\\/]*)
6687 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6688 ;;
6689 *)
6690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in ${llvm_path}
6692do
6693 IFS=$as_save_IFS
6694 test -z "$as_dir" && as_dir=.
6695 for ac_exec_ext in '' $ac_executable_extensions; do
6696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699 break 2
6700 fi
6701done
6702 done
6703IFS=$as_save_IFS
6704
6705 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6706 ;;
6707esac
6708fi
6709ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6710if test -n "$ac_pt_LLVM_PROFDATA"; then
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6712$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6713else
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6719 else
6720 LLVM_PROFDATA="''"
6721 fi
6722else
6723 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6724fi
6725
6726
6727if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6728then
6729 LLVM_PROF_FOUND="found"
6730else
6731 LLVM_PROF_FOUND="not-found"
6732fi
6733if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6734then
6735 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6736 if test -n "${found_llvm_profdata}"
6737 then
6738 # llvm-profdata isn't directly in $PATH in some cases.
6739 # https://apple.stackexchange.com/questions/197053/
6740 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6741 LLVM_PROF_FOUND=found
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6743$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6744 fi
6745fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006746LLVM_PROF_ERR=no
6747case $CC in
6748 *clang*)
6749 # Any changes made here should be reflected in the GCC+Darwin case below
6750 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6751 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006752 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6754 if test $LLVM_PROF_FOUND = not-found
6755 then
6756 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006757 if test "${REQUIRE_PGO}" = "yes"
6758 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006759 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 fi
6762 ;;
6763 *gcc*)
6764 case $ac_sys_system in
6765 Darwin*)
6766 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6767 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006770 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006771 then
6772 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006773 if test "${REQUIRE_PGO}" = "yes"
6774 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006775 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 fi
6778 ;;
6779 *)
6780 PGO_PROF_GEN_FLAG="-fprofile-generate"
6781 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6782 LLVM_PROF_MERGER="true"
6783 LLVM_PROF_FILE=""
6784 ;;
6785 esac
6786 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006787 *icc*)
6788 PGO_PROF_GEN_FLAG="-prof-gen"
6789 PGO_PROF_USE_FLAG="-prof-use"
6790 LLVM_PROF_MERGER="true"
6791 LLVM_PROF_FILE=""
6792 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793esac
6794
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6796# merged with this chunk of code?
6797
6798# Optimizer/debugger flags
6799# ------------------------
6800# (The following bit of code is complicated enough - please keep things
6801# indented properly. Just pretend you're editing Python code. ;-)
6802
6803# There are two parallel sets of case statements below, one that checks to
6804# see if OPT was set and one that does BASECFLAGS setting based upon
6805# compiler and platform. BASECFLAGS tweaks need to be made even if the
6806# user set OPT.
6807
6808# tweak OPT based on compiler and platform, only if the user didn't set
6809# it on the command line
6810
Victor Stinner9ed34a82017-05-02 22:35:58 +02006811
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006812if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813then
6814 case $GCC in
6815 yes)
6816 if test "$CC" != 'g++' ; then
6817 STRICT_PROTO="-Wstrict-prototypes"
6818 fi
6819 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6820 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6821 WRAP="-fwrapv"
6822 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006823
Stefan Krahaf04ff22011-12-08 22:20:31 +01006824 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006825 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006826 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006827 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006828 *)
6829 if $CC --version 2>&1 | grep -q clang
6830 then
6831 cc_is_clang=1
6832 else
6833 cc_is_clang=
6834 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006835 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006836
Victor Stinner35f3d242017-04-21 12:35:24 +02006837 if test -n "${cc_is_clang}"
6838 then
6839 # Clang also needs -fwrapv
6840 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006841 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6842 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006843 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006844 fi
6845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846 case $ac_cv_prog_cc_g in
6847 yes)
6848 if test "$Py_DEBUG" = 'true' ; then
6849 # Optimization messes up debuggers, so turn it off for
6850 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006851 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006852 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006853 else
Victor Stinner28205b22017-04-21 11:24:34 +02006854 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006855 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 else
Victor Stinner28205b22017-04-21 11:24:34 +02006857 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 fi
6859 ;;
6860 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006861 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 ;;
6863 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006864
Victor Stinner826f83f2017-04-28 15:07:10 +02006865 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 case $ac_sys_system in
6868 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6869 ;;
6870 esac
6871 ;;
6872
6873 *)
6874 OPT="-O"
6875 ;;
6876 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877fi
6878
6879
6880
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882# The -arch flags for universal builds on OSX
6883UNIVERSAL_ARCH_FLAGS=
6884
6885
6886# tweak BASECFLAGS based on compiler and platform
6887case $GCC in
6888yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006889 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006890
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6892$as_echo_n "checking for -Wextra... " >&6; }
6893 ac_save_cc="$CC"
6894 CC="$CC -Wextra -Werror"
6895 if ${ac_cv_extra_warnings+:} false; then :
6896 $as_echo_n "(cached) " >&6
6897else
6898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6899/* end confdefs.h. */
6900
6901
6902int
6903main ()
6904{
6905
6906 ;
6907 return 0;
6908}
6909
6910_ACEOF
6911if ac_fn_c_try_compile "$LINENO"; then :
6912
6913 ac_cv_extra_warnings=yes
6914
6915else
6916
6917 ac_cv_extra_warnings=no
6918
6919fi
6920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6921fi
6922
6923 CC="$ac_save_cc"
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6925$as_echo "$ac_cv_extra_warnings" >&6; }
6926
6927 if test $ac_cv_extra_warnings = yes
6928 then
6929 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6930 fi
6931
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006932 # Python doesn't violate C99 aliasing rules, but older versions of
6933 # GCC produce warnings for legal Python code. Enable
6934 # -fno-strict-aliasing on versions of GCC that support but produce
6935 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6937$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938 ac_save_cc="$CC"
6939 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006940 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006941 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006943else
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006946
Matthias Kloseb159a552010-04-25 21:00:44 +00006947
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006948int
6949main ()
6950{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006951
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006952 ;
6953 return 0;
6954}
Matthias Kloseb159a552010-04-25 21:00:44 +00006955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006957if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
6959 CC="$ac_save_cc -fstrict-aliasing"
6960 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006962/* end confdefs.h. */
6963
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006964 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965int
6966main ()
6967{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006968double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969 ;
6970 return 0;
6971}
Matthias Kloseb159a552010-04-25 21:00:44 +00006972
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006974if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
6976 ac_cv_no_strict_aliasing=no
6977
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978else
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
6980 ac_cv_no_strict_aliasing=yes
6981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006984
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985else
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 ac_cv_no_strict_aliasing=no
6988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006991fi
6992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6996$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998 then
6999 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7000 fi
7001
Zachary Ware5af85642015-12-21 12:09:17 -06007002 # ICC doesn't recognize the option, but only emits a warning
7003 ## XXX does it emit an unused result warning and can it be disabled?
7004 case "$CC" in
7005 *icc*)
7006 ac_cv_disable_unused_result_warning=no
7007 ;;
7008 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7010$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7011 ac_save_cc="$CC"
7012 CC="$CC -Wunused-result -Werror"
7013 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007014 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007015 $as_echo_n "(cached) " >&6
7016else
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018/* end confdefs.h. */
7019
7020
7021int
7022main ()
7023{
7024
7025 ;
7026 return 0;
7027}
7028
7029_ACEOF
7030if ac_fn_c_try_compile "$LINENO"; then :
7031
7032 ac_cv_disable_unused_result_warning=yes
7033
7034else
7035
7036 ac_cv_disable_unused_result_warning=no
7037
7038fi
7039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7040fi
7041
7042 CFLAGS="$save_CFLAGS"
7043 CC="$ac_save_cc"
7044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7045$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007046 ;;
7047 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007048
7049 if test $ac_cv_disable_unused_result_warning = yes
7050 then
7051 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007052 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7053 fi
7054
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7056$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7057 ac_save_cc="$CC"
7058 CC="$CC -Wunused-parameter -Werror"
7059 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061else
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064
7065
7066int
7067main ()
7068{
7069
7070 ;
7071 return 0;
7072}
7073
7074_ACEOF
7075if ac_fn_c_try_compile "$LINENO"; then :
7076
7077 ac_cv_disable_unused_parameter_warning=yes
7078
7079else
7080
7081 ac_cv_disable_unused_parameter_warning=no
7082
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085fi
7086
7087 CC="$ac_save_cc"
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7089$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7090
7091 if test $ac_cv_disable_unused_parameter_warning = yes
7092 then
7093 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7094 fi
7095
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7097$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7098 ac_save_cc="$CC"
7099 CC="$CC -Wmissing-field-initializers -Werror"
7100 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7101 $as_echo_n "(cached) " >&6
7102else
7103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7104/* end confdefs.h. */
7105
7106
7107int
7108main ()
7109{
7110
7111 ;
7112 return 0;
7113}
7114
7115_ACEOF
7116if ac_fn_c_try_compile "$LINENO"; then :
7117
7118 ac_cv_disable_missing_field_initializers=yes
7119
7120else
7121
7122 ac_cv_disable_missing_field_initializers=no
7123
7124fi
7125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7126fi
7127
7128 CC="$ac_save_cc"
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7130$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7131
7132 if test $ac_cv_disable_missing_field_initializers = yes
7133 then
7134 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007135 fi
7136
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7138$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7139 ac_save_cc="$CC"
7140 CC="$CC -Wsign-compare"
7141 save_CFLAGS="$CFLAGS"
7142 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7143 $as_echo_n "(cached) " >&6
7144else
7145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7146/* end confdefs.h. */
7147
7148
7149int
7150main ()
7151{
7152
7153 ;
7154 return 0;
7155}
7156
7157_ACEOF
7158if ac_fn_c_try_compile "$LINENO"; then :
7159
7160 ac_cv_enable_sign_compare_warning=yes
7161
7162else
7163
7164 ac_cv_enable_sign_compare_warning=no
7165
7166fi
7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7168fi
7169
7170 CFLAGS="$save_CFLAGS"
7171 CC="$ac_save_cc"
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7173$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7174
7175 if test $ac_cv_enable_sign_compare_warning = yes
7176 then
7177 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7178 fi
7179
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7181$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7182 ac_save_cc="$CC"
7183 CC="$CC -Wunreachable-code"
7184 save_CFLAGS="$CFLAGS"
7185 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7186 $as_echo_n "(cached) " >&6
7187else
7188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7189/* end confdefs.h. */
7190
7191
7192int
7193main ()
7194{
7195
7196 ;
7197 return 0;
7198}
7199
7200_ACEOF
7201if ac_fn_c_try_compile "$LINENO"; then :
7202
7203 ac_cv_enable_unreachable_code_warning=yes
7204
7205else
7206
7207 ac_cv_enable_unreachable_code_warning=no
7208
7209fi
7210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7211fi
7212
7213 CFLAGS="$save_CFLAGS"
7214 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007215
7216 # Don't enable unreachable code warning in debug mode, since it usually
7217 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007218 # Issue #24324: Unfortunately, the unreachable code warning does not work
7219 # correctly on gcc and has been silently removed from the compiler.
7220 # It is supported on clang but on OS X systems gcc may be an alias
7221 # for clang. Try to determine if the compiler is not really gcc and,
7222 # if so, only then enable the warning.
7223 if test $ac_cv_enable_unreachable_code_warning = yes && \
7224 test "$Py_DEBUG" != "true" && \
7225 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007226 then
7227 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007228 else
7229 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007230 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7232$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007233
Victor Stinner193ee0a2017-02-06 14:24:00 +01007234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7235$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7236 ac_save_cc="$CC"
7237 CC="$CC -Werror=implicit-function-declaration"
7238 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7239 $as_echo_n "(cached) " >&6
7240else
7241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7242/* end confdefs.h. */
7243
7244
7245int
7246main ()
7247{
7248
7249 ;
7250 return 0;
7251}
7252
7253_ACEOF
7254if ac_fn_c_try_compile "$LINENO"; then :
7255
7256 ac_cv_enable_implicit_function_declaration_error=yes
7257
7258else
7259
7260 ac_cv_enable_implicit_function_declaration_error=no
7261
7262fi
7263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7264fi
7265
7266 CC="$ac_save_cc"
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7268$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7269
7270 if test $ac_cv_enable_implicit_function_declaration_error = yes
7271 then
7272 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7273 fi
7274
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7276 # support. Without this, treatment of subnormals doesn't follow
7277 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007278 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007279 alpha*)
7280 BASECFLAGS="$BASECFLAGS -mieee"
7281 ;;
7282 esac
7283
7284 case $ac_sys_system in
7285 SCO_SV*)
7286 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7287 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007288
7289 # is there any other compiler on Darwin besides gcc?
7290 Darwin*)
7291 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7292 # used to be here, but non-Apple gcc doesn't accept them.
7293 if test "${CC}" = gcc
7294 then
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007296$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007297 case "${UNIVERSALSDK}" in
7298 */MacOSX10.4u.sdk)
7299 # Build using 10.4 SDK, force usage of gcc when the
7300 # compiler is gcc, otherwise the user will get very
7301 # confusing error messages when building on OSX 10.6
7302 CC=gcc-4.0
7303 CPP=cpp-4.0
7304 ;;
7305 esac
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007307$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007308 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007309
Ned Deily87adb6e2013-10-18 21:09:56 -07007310 if test "${enable_universalsdk}"
7311 then
7312 case "$UNIVERSAL_ARCHS" in
7313 32-bit)
7314 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7315 LIPO_32BIT_FLAGS=""
7316 ARCH_RUN_32BIT=""
7317 ;;
7318 64-bit)
7319 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7320 LIPO_32BIT_FLAGS=""
7321 ARCH_RUN_32BIT="true"
7322 ;;
7323 all)
7324 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7325 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7326 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7327 ;;
7328 intel)
7329 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7330 LIPO_32BIT_FLAGS="-extract i386"
7331 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7332 ;;
7333 intel-32)
7334 UNIVERSAL_ARCH_FLAGS="-arch i386"
7335 LIPO_32BIT_FLAGS=""
7336 ARCH_RUN_32BIT=""
7337 ;;
7338 3-way)
7339 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7340 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7341 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7342 ;;
7343 *)
7344 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7345 ;;
7346 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347
Ned Deily87adb6e2013-10-18 21:09:56 -07007348 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7349 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7350 if test "${UNIVERSALSDK}" != "/"
7351 then
7352 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7353 fi
7354 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 # Calculate an appropriate deployment target for this build:
7357 # The deployment target value is used explicitly to enable certain
7358 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007359 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 # component of the string returned by distutils.get_platform().
7361 #
7362 # Use the value from:
7363 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7364 # 2. the operating system version of the build machine if >= 10.6
7365 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7366 # below to pick either 10.3, 10.4, or 10.5 as the target.
7367 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368
Ned Deily87adb6e2013-10-18 21:09:56 -07007369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7370$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007371 cur_target_major=`sw_vers -productVersion | \
7372 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7373 cur_target_minor=`sw_vers -productVersion | \
7374 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7375 cur_target="${cur_target_major}.${cur_target_minor}"
7376 if test ${cur_target_major} -eq 10 && \
7377 test ${cur_target_minor} -ge 3 && \
7378 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007379 then
Ned Deily36820b62014-06-25 13:44:22 -07007380 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007381 cur_target=10.3
7382 if test ${enable_universalsdk}
7383 then
7384 case "$UNIVERSAL_ARCHS" in
7385 all|3-way|intel|64-bit)
7386 # These configurations were first supported in 10.5
7387 cur_target='10.5'
7388 ;;
7389 esac
7390 else
7391 if test `/usr/bin/arch` = "i386"
7392 then
7393 # 10.4 was the first release to support Intel archs
7394 cur_target="10.4"
7395 fi
7396 fi
7397 fi
7398 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007399
Ned Deily87adb6e2013-10-18 21:09:56 -07007400 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7401 # environment with a value that is the same as what we'll use
7402 # in the Makefile to ensure that we'll get the same compiler
7403 # environment during configure and build time.
7404 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7405 export MACOSX_DEPLOYMENT_TARGET
7406 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7408$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007409
Ned Deily87adb6e2013-10-18 21:09:56 -07007410 # end of Darwin* tests
7411 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412 esac
7413 ;;
7414
7415*)
7416 case $ac_sys_system in
7417 OpenUNIX*|UnixWare*)
7418 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7419 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420 SCO_SV*)
7421 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7422 ;;
7423 esac
7424 ;;
7425esac
7426
Zachary Ware5af85642015-12-21 12:09:17 -06007427# ICC needs -fp-model strict or floats behave badly
7428case "$CC" in
7429*icc*)
7430 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7431 ;;
7432esac
7433
T. Woutersddbfa2c2017-05-23 01:30:49 +02007434if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435 :
7436else
7437 OPT="-DNDEBUG $OPT"
7438fi
7439
7440if test "$ac_arch_flags"
7441then
7442 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7443fi
7444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445# On some compilers, pthreads are available without further options
7446# (e.g. MacOS X). On some of these systems, the compiler will not
7447# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7448# So we have to see first whether pthreads are available without
7449# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7451$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007452if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454else
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456 ac_cv_pthread_is_default=no
7457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459/* end confdefs.h. */
7460
Stefan Krah7dba5942012-11-22 22:49:11 +01007461#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462#include <pthread.h>
7463
7464void* routine(void* p){return NULL;}
7465
7466int main(){
7467 pthread_t p;
7468 if(pthread_create(&p,NULL,routine,NULL)!=0)
7469 return 1;
7470 (void)pthread_detach(p);
7471 return 0;
7472}
7473
7474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007475if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476
7477 ac_cv_pthread_is_default=yes
7478 ac_cv_kthread=no
7479 ac_cv_pthread=no
7480
7481else
Matthias Kloseb9621712010-04-24 17:59:49 +00007482 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486fi
7487
7488
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489fi
7490
Matthias Kloseb9621712010-04-24 17:59:49 +00007491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7492$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493
7494
7495if test $ac_cv_pthread_is_default = yes
7496then
7497 ac_cv_kpthread=no
7498else
7499# -Kpthread, if available, provides the right #defines
7500# and linker options to make pthread_create available
7501# Some compilers won't report that they do not support -Kpthread,
7502# so we need to run a program to see whether it really made the
7503# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7505$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007506if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007507 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508else
7509 ac_save_cc="$CC"
7510CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007511if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512 ac_cv_kpthread=no
7513else
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515/* end confdefs.h. */
7516
Stefan Krah7dba5942012-11-22 22:49:11 +01007517#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518#include <pthread.h>
7519
7520void* routine(void* p){return NULL;}
7521
7522int main(){
7523 pthread_t p;
7524 if(pthread_create(&p,NULL,routine,NULL)!=0)
7525 return 1;
7526 (void)pthread_detach(p);
7527 return 0;
7528}
7529
7530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007531if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 ac_cv_kpthread=yes
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538fi
7539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540CC="$ac_save_cc"
7541fi
7542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7544$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
7546
7547if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7548then
7549# -Kthread, if available, provides the right #defines
7550# and linker options to make pthread_create available
7551# Some compilers won't report that they do not support -Kthread,
7552# so we need to run a program to see whether it really made the
7553# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7555$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007556if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558else
7559 ac_save_cc="$CC"
7560CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007561if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562 ac_cv_kthread=no
7563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565/* end confdefs.h. */
7566
Stefan Krah7dba5942012-11-22 22:49:11 +01007567#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568#include <pthread.h>
7569
7570void* routine(void* p){return NULL;}
7571
7572int main(){
7573 pthread_t p;
7574 if(pthread_create(&p,NULL,routine,NULL)!=0)
7575 return 1;
7576 (void)pthread_detach(p);
7577 return 0;
7578}
7579
7580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582 ac_cv_kthread=yes
7583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590CC="$ac_save_cc"
7591fi
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7594$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595fi
7596
7597if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7598then
7599# -pthread, if available, provides the right #defines
7600# and linker options to make pthread_create available
7601# Some compilers won't report that they do not support -pthread,
7602# so we need to run a program to see whether it really made the
7603# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7605$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007606if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608else
7609 ac_save_cc="$CC"
7610CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007611if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612 ac_cv_pthread=no
7613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615/* end confdefs.h. */
7616
Stefan Krah7dba5942012-11-22 22:49:11 +01007617#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618#include <pthread.h>
7619
7620void* routine(void* p){return NULL;}
7621
7622int main(){
7623 pthread_t p;
7624 if(pthread_create(&p,NULL,routine,NULL)!=0)
7625 return 1;
7626 (void)pthread_detach(p);
7627 return 0;
7628}
7629
7630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007631if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632 ac_cv_pthread=yes
7633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640CC="$ac_save_cc"
7641fi
7642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7644$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645fi
7646
7647# If we have set a CC compiler flag for thread support then
7648# check if it works for CXX, too.
7649ac_cv_cxx_thread=no
7650if test ! -z "$CXX"
7651then
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7653$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654ac_save_cxx="$CXX"
7655
7656if test "$ac_cv_kpthread" = "yes"
7657then
7658 CXX="$CXX -Kpthread"
7659 ac_cv_cxx_thread=yes
7660elif test "$ac_cv_kthread" = "yes"
7661then
7662 CXX="$CXX -Kthread"
7663 ac_cv_cxx_thread=yes
7664elif test "$ac_cv_pthread" = "yes"
7665then
7666 CXX="$CXX -pthread"
7667 ac_cv_cxx_thread=yes
7668fi
7669
7670if test $ac_cv_cxx_thread = yes
7671then
7672 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7673 $CXX -c conftest.$ac_ext 2>&5
7674 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7675 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7676 then
7677 ac_cv_cxx_thread=yes
7678 else
7679 ac_cv_cxx_thread=no
7680 fi
7681 rm -fr conftest*
7682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7684$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685fi
7686CXX="$ac_save_cxx"
7687
7688
7689# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7691$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007692if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696/* end confdefs.h. */
7697#include <stdlib.h>
7698#include <stdarg.h>
7699#include <string.h>
7700#include <float.h>
7701
7702int
7703main ()
7704{
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711 ac_cv_header_stdc=yes
7712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7716
7717if test $ac_cv_header_stdc = yes; then
7718 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720/* end confdefs.h. */
7721#include <string.h>
7722
7723_ACEOF
7724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 $EGREP "memchr" >/dev/null 2>&1; then :
7726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727else
7728 ac_cv_header_stdc=no
7729fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007730rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731
7732fi
7733
7734if test $ac_cv_header_stdc = yes; then
7735 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737/* end confdefs.h. */
7738#include <stdlib.h>
7739
7740_ACEOF
7741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 $EGREP "free" >/dev/null 2>&1; then :
7743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744else
7745 ac_cv_header_stdc=no
7746fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007747rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748
7749fi
7750
7751if test $ac_cv_header_stdc = yes; then
7752 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754 :
7755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757/* end confdefs.h. */
7758#include <ctype.h>
7759#include <stdlib.h>
7760#if ((' ' & 0x0FF) == 0x020)
7761# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7762# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7763#else
7764# define ISLOWER(c) \
7765 (('a' <= (c) && (c) <= 'i') \
7766 || ('j' <= (c) && (c) <= 'r') \
7767 || ('s' <= (c) && (c) <= 'z'))
7768# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7769#endif
7770
7771#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7772int
7773main ()
7774{
7775 int i;
7776 for (i = 0; i < 256; i++)
7777 if (XOR (islower (i), ISLOWER (i))
7778 || toupper (i) != TOUPPER (i))
7779 return 2;
7780 return 0;
7781}
7782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007783if ac_fn_c_try_run "$LINENO"; then :
7784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785else
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
7791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792fi
7793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7795$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796if test $ac_cv_header_stdc = yes; then
7797
Matthias Kloseb9621712010-04-24 17:59:49 +00007798$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799
7800fi
7801
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007802for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007803fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007804ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007805sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007806unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007807poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007808sys/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 +01007809sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007810sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007811sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007812sys/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 -07007813libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007814linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007815sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007816do :
7817 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7818ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007819if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007821#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007822_ACEOF
7823
7824fi
7825
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826done
7827
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007828ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007829for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7832$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007837/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838#include <sys/types.h>
7839#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007840
Martin v. Löwis11437992002-04-12 09:54:03 +00007841int
7842main ()
7843{
7844if ((DIR *) 0)
7845return 0;
7846 ;
7847 return 0;
7848}
7849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007857eval ac_res=\$$as_ac_Header
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7859$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007860if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007862#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007863_ACEOF
7864
7865ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007866fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868done
7869# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7870if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7872$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007873if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007875else
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880/* Override any GCC internal prototype to avoid an error.
7881 Use char because int might match the return type of a GCC
7882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883#ifdef __cplusplus
7884extern "C"
7885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007886char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007887int
7888main ()
7889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 ;
7892 return 0;
7893}
7894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895for ac_lib in '' dir; do
7896 if test -z "$ac_lib"; then
7897 ac_res="none required"
7898 else
7899 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905rm -f core conftest.err conftest.$ac_objext \
7906 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007907 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910done
Victor Stinnere0be4232011-10-25 13:06:09 +02007911if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913else
7914 ac_cv_search_opendir=no
7915fi
7916rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007917LIBS=$ac_func_search_save_LIBS
7918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7920$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007922if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007925fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007926
Michael W. Hudson54241132001-12-07 15:38:26 +00007927else
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7929$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007930if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007932else
7933 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937/* Override any GCC internal prototype to avoid an error.
7938 Use char because int might match the return type of a GCC
7939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940#ifdef __cplusplus
7941extern "C"
7942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007943char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007944int
7945main ()
7946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ;
7949 return 0;
7950}
7951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952for ac_lib in '' x; do
7953 if test -z "$ac_lib"; then
7954 ac_res="none required"
7955 else
7956 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007964 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967done
Victor Stinnere0be4232011-10-25 13:06:09 +02007968if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970else
7971 ac_cv_search_opendir=no
7972fi
7973rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007974LIBS=$ac_func_search_save_LIBS
7975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7977$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007982fi
7983
7984fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007985
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7987$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007988if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007992/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007993#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007994int
7995main ()
7996{
7997return makedev(0, 0);
7998 ;
7999 return 0;
8000}
8001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008003 ac_cv_header_sys_types_h_makedev=yes
8004else
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007rm -f core conftest.err conftest.$ac_objext \
8008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008009
8010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8012$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008013
8014if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008015ac_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 +02008016if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008017
Matthias Kloseb9621712010-04-24 17:59:49 +00008018$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008019
8020fi
8021
8022
8023
8024 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 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 +02008026if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008029
8030fi
8031
8032
8033 fi
8034fi
8035
Michael W. Hudson54241132001-12-07 15:38:26 +00008036
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008037# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8038# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8039SAVE_CFLAGS=$CFLAGS
8040CFLAGS="-std=c99 $CFLAGS"
8041for ac_header in bluetooth/bluetooth.h
8042do :
8043 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8044if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8045 cat >>confdefs.h <<_ACEOF
8046#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8047_ACEOF
8048
8049fi
8050
8051done
8052
8053CFLAGS=$SAVE_CFLAGS
8054
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008055# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8056for ac_header in net/if.h
8057do :
8058 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8059#ifdef STDC_HEADERS
8060# include <stdlib.h>
8061# include <stddef.h>
8062#else
8063# ifdef HAVE_STDLIB_H
8064# include <stdlib.h>
8065# endif
8066#endif
8067#ifdef HAVE_SYS_SOCKET_H
8068# include <sys/socket.h>
8069#endif
8070
8071"
Victor Stinnere0be4232011-10-25 13:06:09 +02008072if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008073 cat >>confdefs.h <<_ACEOF
8074#define HAVE_NET_IF_H 1
8075_ACEOF
8076
8077fi
8078
8079done
8080
8081
Martin v. Löwis11017b12006-01-14 18:12:57 +00008082# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008083for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008084do :
8085 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 +00008086#ifdef HAVE_ASM_TYPES_H
8087#include <asm/types.h>
8088#endif
8089#ifdef HAVE_SYS_SOCKET_H
8090#include <sys/socket.h>
8091#endif
8092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093"
Victor Stinnere0be4232011-10-25 13:06:09 +02008094if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008095 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008096#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008097_ACEOF
8098
8099fi
8100
8101done
8102
8103
Charles-François Natali47413c12011-10-06 19:47:44 +02008104# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008105for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008106do :
8107 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8108ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8109#ifdef HAVE_SYS_SOCKET_H
8110#include <sys/socket.h>
8111#endif
8112
8113"
8114if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8115 cat >>confdefs.h <<_ACEOF
8116#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8117_ACEOF
8118
8119fi
8120
8121done
8122
8123
Guido van Rossum627b2d71993-12-24 10:39:16 +00008124# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008125was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8127$as_echo_n "checking for clock_t in time.h... " >&6; }
8128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008129/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
8132_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008135 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008136else
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
8138
Matthias Kloseb9621712010-04-24 17:59:49 +00008139$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008140
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008141
Guido van Rossum627b2d71993-12-24 10:39:16 +00008142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008143rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8146$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8149$as_echo_n "checking for makedev... " >&6; }
8150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008151/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008152
Jesus Cea740f53a2010-04-28 11:35:30 +00008153#if defined(MAJOR_IN_MKDEV)
8154#include <sys/mkdev.h>
8155#elif defined(MAJOR_IN_SYSMACROS)
8156#include <sys/sysmacros.h>
8157#else
8158#include <sys/types.h>
8159#endif
8160
Neal Norwitz11690112002-07-30 01:08:28 +00008161int
8162main ()
8163{
Jesus Cea740f53a2010-04-28 11:35:30 +00008164
8165 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008166 ;
8167 return 0;
8168}
Matthias Kloseb159a552010-04-25 21:00:44 +00008169
Neal Norwitz11690112002-07-30 01:08:28 +00008170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008171if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008172 ac_cv_has_makedev=yes
8173else
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176rm -f core conftest.err conftest.$ac_objext \
8177 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8179$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008180if test "$ac_cv_has_makedev" = "yes"; then
8181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008183
8184fi
8185
Christian Heimes985ecdc2013-11-20 11:46:18 +01008186# byte swapping
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8188$as_echo_n "checking for le64toh... " >&6; }
8189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8190/* end confdefs.h. */
8191
8192#ifdef HAVE_ENDIAN_H
8193#include <endian.h>
8194#elif defined(HAVE_SYS_ENDIAN_H)
8195#include <sys/endian.h>
8196#endif
8197
8198int
8199main ()
8200{
8201
8202 le64toh(1)
8203 ;
8204 return 0;
8205}
8206
8207_ACEOF
8208if ac_fn_c_try_link "$LINENO"; then :
8209 ac_cv_has_le64toh=yes
8210else
8211 ac_cv_has_le64toh=no
8212fi
8213rm -f core conftest.err conftest.$ac_objext \
8214 conftest$ac_exeext conftest.$ac_ext
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8216$as_echo "$ac_cv_has_le64toh" >&6; }
8217if test "$ac_cv_has_le64toh" = "yes"; then
8218
8219$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8220
8221fi
8222
Martin v. Löwis399a6892002-10-04 10:22:02 +00008223# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8224# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8225# defined, but the compiler does not support pragma redefine_extname,
8226# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8227# structures (such as rlimit64) without declaring them. As a
8228# work-around, disable LFS on such configurations
8229
8230use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8232$as_echo_n "checking Solaris LFS bug... " >&6; }
8233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235
8236#define _LARGEFILE_SOURCE 1
8237#define _FILE_OFFSET_BITS 64
8238#include <sys/resource.h>
8239
Martin v. Löwis399a6892002-10-04 10:22:02 +00008240int
8241main ()
8242{
8243struct rlimit foo;
8244 ;
8245 return 0;
8246}
8247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008249 sol_lfs_bug=no
8250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8255$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008256if test "$sol_lfs_bug" = "yes"; then
8257 use_lfs=no
8258fi
8259
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008260# Don't use largefile support for GNU/Hurd
8261case $ac_sys_system in GNU*)
8262 use_lfs=no
8263esac
8264
Martin v. Löwis399a6892002-10-04 10:22:02 +00008265if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008266# Two defines needed to enable largefile support on various platforms
8267# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008268case $ac_sys_system/$ac_sys_release in
8269AIX*)
8270
8271$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8272
8273 ;;
8274esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008280
Martin v. Löwis399a6892002-10-04 10:22:02 +00008281fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008282
Guido van Rossum84e7b241996-08-19 21:59:00 +00008283# Add some code to confdefs.h so that the test for off_t works on SCO
8284cat >> confdefs.h <<\EOF
8285#if defined(SCO_DS)
8286#undef _OFF_T
8287#endif
8288EOF
8289
Guido van Rossumef2255b2000-03-10 22:30:29 +00008290# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008291ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008294else
Martin v. Löwis11437992002-04-12 09:54:03 +00008295
8296cat >>confdefs.h <<_ACEOF
8297#define mode_t int
8298_ACEOF
8299
8300fi
8301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008303if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008305else
Martin v. Löwis11437992002-04-12 09:54:03 +00008306
8307cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008309_ACEOF
8310
8311fi
8312
Matthias Kloseb9621712010-04-24 17:59:49 +00008313ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008314if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008316else
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
8318cat >>confdefs.h <<_ACEOF
8319#define pid_t int
8320_ACEOF
8321
8322fi
8323
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008326#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008327_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008330if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008332else
Martin v. Löwis11437992002-04-12 09:54:03 +00008333
8334cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
8337
8338fi
8339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8341$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008344else
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008347#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
8349_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008352 ac_cv_type_uid_t=yes
8353else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008354 ac_cv_type_uid_t=no
8355fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008356rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008357
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8360$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008361if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
8365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008367
8368fi
8369
Mark Dickinson983bc162012-12-02 12:11:38 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008372if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008375
8376fi
8377
Stefan Krah1919b7e2012-03-21 18:25:23 +01008378ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8379if test "x$ac_cv_type___uint128_t" = xyes; then :
8380
8381$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8382
8383fi
8384
Jack Jansendd19cf82001-12-06 22:36:17 +00008385
Michael W. Hudson54241132001-12-07 15:38:26 +00008386# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008387# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388# The cast to long int works around a bug in the HP C Compiler
8389# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8390# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8391# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8393$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008394if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008396else
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 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 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 if test "$ac_cv_type_int" = yes; then
8401 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008403as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008404See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 else
8406 ac_cv_sizeof_int=0
8407 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8412$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413
8414
8415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008417#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008418_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008419
8420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421# The cast to long int works around a bug in the HP C Compiler
8422# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8423# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8424# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8426$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008427if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008429else
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 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 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 if test "$ac_cv_type_long" = yes; then
8434 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008436as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008437See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438 else
8439 ac_cv_sizeof_long=0
8440 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008442
Martin v. Löwis11437992002-04-12 09:54:03 +00008443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8445$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446
8447
8448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008450#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008451_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008452
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.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8459$as_echo_n "checking size of long long... " >&6; }
8460if ${ac_cv_sizeof_long_long+:} false; then :
8461 $as_echo_n "(cached) " >&6
8462else
8463 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8464
8465else
8466 if test "$ac_cv_type_long_long" = 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;}
8469as_fn_error 77 "cannot compute sizeof (long long)
8470See \`config.log' for more details" "$LINENO" 5; }
8471 else
8472 ac_cv_sizeof_long_long=0
8473 fi
8474fi
8475
8476fi
8477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8478$as_echo "$ac_cv_sizeof_long_long" >&6; }
8479
8480
8481
8482cat >>confdefs.h <<_ACEOF
8483#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8484_ACEOF
8485
8486
8487# The cast to long int works around a bug in the HP C Compiler
8488# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8489# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8490# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8492$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008495else
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 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 +00008497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 if test "$ac_cv_type_void_p" = yes; then
8500 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008502as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008503See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504 else
8505 ac_cv_sizeof_void_p=0
8506 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8511$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512
8513
8514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008516#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008517_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008518
8519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520# The cast to long int works around a bug in the HP C Compiler
8521# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8522# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8523# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8525$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008526if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008528else
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 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 +00008530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 if test "$ac_cv_type_short" = yes; then
8533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008535as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008536See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537 else
8538 ac_cv_sizeof_short=0
8539 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008541
Martin v. Löwis11437992002-04-12 09:54:03 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8544$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545
8546
8547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008549#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008550_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008551
8552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553# The cast to long int works around a bug in the HP C Compiler
8554# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8555# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8556# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8558$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008559if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008561else
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 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 +00008563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 if test "$ac_cv_type_float" = yes; then
8566 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8567$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008568as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008569See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570 else
8571 ac_cv_sizeof_float=0
8572 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574
Martin v. Löwis11437992002-04-12 09:54:03 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8577$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578
8579
8580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008582#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008583_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008584
8585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586# The cast to long int works around a bug in the HP C Compiler
8587# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8588# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8589# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8591$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008592if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008594else
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 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 +00008596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 if test "$ac_cv_type_double" = yes; then
8599 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008601as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008602See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603 else
8604 ac_cv_sizeof_double=0
8605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8610$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611
8612
8613
Martin v. Löwis11437992002-04-12 09:54:03 +00008614cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008615#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008616_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008617
8618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619# The cast to long int works around a bug in the HP C Compiler
8620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8622# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8624$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008625if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008627else
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 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 +00008629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 if test "$ac_cv_type_fpos_t" = yes; then
8632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008634as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008635See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636 else
8637 ac_cv_sizeof_fpos_t=0
8638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8643$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644
8645
8646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008648#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008649_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008650
Michael W. Hudson54241132001-12-07 15:38:26 +00008651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652# The cast to long int works around a bug in the HP C Compiler
8653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8655# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8657$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008658if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 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 +00008662
Martin v. Löwis18e16552006-02-15 17:27:45 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 if test "$ac_cv_type_size_t" = yes; then
8665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008667as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008668See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669 else
8670 ac_cv_sizeof_size_t=0
8671 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673
Martin v. Löwis18e16552006-02-15 17:27:45 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8676$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677
8678
8679
Martin v. Löwis18e16552006-02-15 17:27:45 +00008680cat >>confdefs.h <<_ACEOF
8681#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8682_ACEOF
8683
8684
Christian Heimes400adb02008-02-01 08:12:03 +00008685# The cast to long int works around a bug in the HP C Compiler
8686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8688# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8690$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008691if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 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 +00008695
Christian Heimes400adb02008-02-01 08:12:03 +00008696else
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 if test "$ac_cv_type_pid_t" = yes; then
8698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008700as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008701See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008702 else
8703 ac_cv_sizeof_pid_t=0
8704 fi
8705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008706
Christian Heimes400adb02008-02-01 08:12:03 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8709$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008710
8711
8712
8713cat >>confdefs.h <<_ACEOF
8714#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8715_ACEOF
8716
8717
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008718# The cast to long int works around a bug in the HP C Compiler
8719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8721# This bug is HP SR number 8606223364.
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8723$as_echo_n "checking size of uintptr_t... " >&6; }
8724if ${ac_cv_sizeof_uintptr_t+:} false; then :
8725 $as_echo_n "(cached) " >&6
8726else
8727 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8728
8729else
8730 if test "$ac_cv_type_uintptr_t" = yes; then
8731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8733as_fn_error 77 "cannot compute sizeof (uintptr_t)
8734See \`config.log' for more details" "$LINENO" 5; }
8735 else
8736 ac_cv_sizeof_uintptr_t=0
8737 fi
8738fi
8739
8740fi
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8742$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8743
8744
8745
8746cat >>confdefs.h <<_ACEOF
8747#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8748_ACEOF
8749
8750
Michael W. Hudson54241132001-12-07 15:38:26 +00008751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8753$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008754have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756/* end confdefs.h. */
8757
8758int
8759main ()
8760{
8761long double x; x = (long double)0;
8762 ;
8763 return 0;
8764}
8765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008766if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767
8768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008770
8771 have_long_double=yes
8772
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008773fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8776$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008777if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008778# The cast to long int works around a bug in the HP C Compiler
8779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8783$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008784if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008786else
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 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 +00008788
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 if test "$ac_cv_type_long_double" = yes; then
8791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008793as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008794See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008795 else
8796 ac_cv_sizeof_long_double=0
8797 fi
8798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8802$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008803
8804
8805
8806cat >>confdefs.h <<_ACEOF
8807#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8808_ACEOF
8809
8810
8811fi
8812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813# The cast to long int works around a bug in the HP C Compiler
8814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8816# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8818$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008819if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 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 +00008823
Thomas Woutersb2137042007-02-01 18:02:27 +00008824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 if test "$ac_cv_type__Bool" = yes; then
8826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008828as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008829See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830 else
8831 ac_cv_sizeof__Bool=0
8832 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008834
Thomas Woutersb2137042007-02-01 18:02:27 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8837$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838
8839
8840
Thomas Woutersb2137042007-02-01 18:02:27 +00008841cat >>confdefs.h <<_ACEOF
8842#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8843_ACEOF
8844
8845
Thomas Woutersb2137042007-02-01 18:02:27 +00008846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847# The cast to long int works around a bug in the HP C Compiler
8848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8850# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8852$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008853if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857#ifdef HAVE_SYS_TYPES_H
8858#include <sys/types.h>
8859#endif
8860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 if test "$ac_cv_type_off_t" = yes; then
8865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008867as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008868See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008869 else
8870 ac_cv_sizeof_off_t=0
8871 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008873
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8876$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008877
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878
8879
Martin v. Löwis11437992002-04-12 09:54:03 +00008880cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008881#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008882_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008883
Michael W. Hudson54241132001-12-07 15:38:26 +00008884
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8887$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008888if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008889 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8894$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008895else
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8897$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008898fi
8899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900# The cast to long int works around a bug in the HP C Compiler
8901# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8902# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8903# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8905$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008906if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910#ifdef HAVE_SYS_TYPES_H
8911#include <sys/types.h>
8912#endif
8913#ifdef HAVE_TIME_H
8914#include <time.h>
8915#endif
8916
Matthias Kloseb9621712010-04-24 17:59:49 +00008917"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 if test "$ac_cv_type_time_t" = yes; then
8921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008923as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008924See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925 else
8926 ac_cv_sizeof_time_t=0
8927 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8932$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008933
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008934
8935
Martin v. Löwis11437992002-04-12 09:54:03 +00008936cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008937#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008938_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008939
Michael W. Hudson54241132001-12-07 15:38:26 +00008940
8941
Trent Mick635f6fb2000-08-23 21:33:05 +00008942# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008943ac_save_cc="$CC"
8944if test "$ac_cv_kpthread" = "yes"
8945then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008946elif test "$ac_cv_kthread" = "yes"
8947then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008948elif test "$ac_cv_pthread" = "yes"
8949then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008950fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008951
Matthias Kloseb9621712010-04-24 17:59:49 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8953$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008954have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008956/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
8958 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008959int
8960main ()
8961{
Guido van Rossum12580492000-09-24 16:47:19 +00008962pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 ;
8964 return 0;
8965}
Matthias Kloseb159a552010-04-25 21:00:44 +00008966
Martin v. Löwis11437992002-04-12 09:54:03 +00008967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008968if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008969 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8973$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008974if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8978# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8980$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008981if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983else
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985#ifdef HAVE_PTHREAD_H
8986#include <pthread.h>
8987#endif
8988
Matthias Kloseb9621712010-04-24 17:59:49 +00008989"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 if test "$ac_cv_type_pthread_t" = yes; then
8993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008995as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008996See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008997 else
8998 ac_cv_sizeof_pthread_t=0
8999 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001
Trent Mick635f6fb2000-08-23 21:33:05 +00009002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9004$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009006
9007
Martin v. Löwis11437992002-04-12 09:54:03 +00009008cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009009#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009010_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009012
Trent Mick635f6fb2000-08-23 21:33:05 +00009013fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009014CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009015
Michael W. Hudson54241132001-12-07 15:38:26 +00009016
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009017case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009018 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009019 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9020 ;;
9021 Darwin/*)
9022 OTHER_LIBTOOL_OPT=""
9023 ;;
9024esac
9025
9026
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009027
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009028case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009029 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009030 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9031 if test "${enable_universalsdk}"; then
9032 :
9033 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009034 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009035 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009036 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009037 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009038 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009039 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009040 if test ${gcc_version} '<' 4.0
9041 then
9042 LIBTOOL_CRUFT="-lcc_dynamic"
9043 else
9044 LIBTOOL_CRUFT=""
9045 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009047 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009048else
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009051
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052 #include <unistd.h>
9053 int main(int argc, char*argv[])
9054 {
9055 if (sizeof(long) == 4) {
9056 return 0;
9057 } else {
9058 return 1;
9059 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009060 }
9061
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009063if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009064 ac_osx_32bit=yes
9065else
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009070fi
9071
9072
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009073 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009074 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075 i386)
9076 MACOSX_DEFAULT_ARCH="i386"
9077 ;;
9078 ppc)
9079 MACOSX_DEFAULT_ARCH="ppc"
9080 ;;
9081 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009082 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009083 ;;
9084 esac
9085 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009086 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009087 i386)
9088 MACOSX_DEFAULT_ARCH="x86_64"
9089 ;;
9090 ppc)
9091 MACOSX_DEFAULT_ARCH="ppc64"
9092 ;;
9093 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009094 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009095 ;;
9096 esac
9097
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009098 fi
9099
9100 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009101 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009102 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009103esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9105$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009106if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009107then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009108 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009110 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009113
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9115$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009116 if test $enable_shared = "yes"
9117 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009118 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 +00009119 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009120else
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009123fi
9124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9126$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009127case $ac_sys_system/$ac_sys_release in
9128 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9133$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009134 ;;
9135 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9137$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009138 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009139esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009140
Guido van Rossum0a516c91994-09-12 10:58:40 +00009141# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009142
Michael W. Hudson54241132001-12-07 15:38:26 +00009143
9144
9145
9146
Benjamin Peterson99f03762010-04-11 22:15:28 +00009147
Thomas Wouters477c8d52006-05-27 19:21:47 +00009148
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009149# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9150# -- usually .so, .sl on HP-UX, .dll on Cygwin
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9152$as_echo_n "checking the extension of shared libraries... " >&6; }
9153if test -z "$SHLIB_SUFFIX"; then
9154 case $ac_sys_system in
9155 hp*|HP*)
9156 case `uname -m` in
9157 ia64) SHLIB_SUFFIX=.so;;
9158 *) SHLIB_SUFFIX=.sl;;
9159 esac
9160 ;;
9161 CYGWIN*) SHLIB_SUFFIX=.dll;;
9162 *) SHLIB_SUFFIX=.so;;
9163 esac
9164fi
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9166$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009167
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009169# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009170# (Shared libraries in this instance are shared modules to be loaded into
9171# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9173$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009174if test -z "$LDSHARED"
9175then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009176 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009177 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009178 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009179 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009180 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009181 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009182 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 if test "$GCC" = "yes" ; then
9185 LDSHARED='$(CC) -shared'
9186 LDCXXSHARED='$(CXX) -shared'
9187 else
9188 LDSHARED='$(CC) -G'
9189 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009190 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009191 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 if test "$GCC" = "yes" ; then
9193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared'
9195 else
9196 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009197 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009198 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009199 LDSHARED='$(CC) -bundle'
9200 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009201 if test "$enable_framework" ; then
9202 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009203 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9204 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009206 else
9207 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009208 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009209 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009210 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009211 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009212 LDSHARED='$(CC) -bundle'
9213 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009214 if test "$enable_framework" ; then
9215 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009216 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9217 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009219 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009220 # No framework, use the Python app as bundle-loader
9221 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009222 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009223 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009224 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009225 Darwin/*)
9226 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9227 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009228
Ned Deily36820b62014-06-25 13:44:22 -07009229 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9230 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9231 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9232 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9233 if test ${dep_target_major} -eq 10 && \
9234 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009235 then
Ned Deily36820b62014-06-25 13:44:22 -07009236 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009237 LDSHARED='$(CC) -bundle'
9238 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009239 if test "$enable_framework" ; then
9240 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009241 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9242 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009243 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009244 else
9245 # No framework, use the Python app as bundle-loader
9246 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9247 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009248 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009249 fi
Ned Deily36820b62014-06-25 13:44:22 -07009250 else
9251 # building for OS X 10.3 and later
9252 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9253 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9254 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009255 fi
9256 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009257 Linux*|GNU*|QNX*)
9258 LDSHARED='$(CC) -shared'
9259 LDCXXSHARED='$(CXX) -shared';;
9260 BSD/OS*/4*)
9261 LDSHARED="gcc -shared"
9262 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009263 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009264 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009265 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009266 LDSHARED='$(CC) -shared'
9267 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009268 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009269 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009270 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009271 OpenBSD*)
9272 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9273 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009274 LDSHARED='$(CC) -shared $(CCSHARED)'
9275 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009276 else
9277 case `uname -r` in
9278 [01].* | 2.[0-7] | 2.[0-7].*)
9279 LDSHARED="ld -Bshareable ${LDFLAGS}"
9280 ;;
9281 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009282 LDSHARED='$(CC) -shared $(CCSHARED)'
9283 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009284 ;;
9285 esac
9286 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009287 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009288 LDSHARED='$(CC) -shared'
9289 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009290 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009291 if test "$GCC" = "yes" ; then
9292 LDSHARED='$(CC) -shared'
9293 LDCXXSHARED='$(CXX) -shared'
9294 else
9295 LDSHARED='$(CC) -G'
9296 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009297 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009298 SCO_SV*)
9299 LDSHARED='$(CC) -Wl,-G,-Bexport'
9300 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9301 CYGWIN*)
9302 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9303 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304 *) LDSHARED="ld";;
9305 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9308$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009309LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009310BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009311# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009312# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9314$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009315if test -z "$CCSHARED"
9316then
Guido van Rossum07397971997-04-29 21:49:50 +00009317 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009318 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009319 then CCSHARED="-fPIC";
9320 elif test `uname -p` = sparc;
9321 then CCSHARED="-xcode=pic32";
9322 else CCSHARED="-Kpic";
9323 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009324 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009325 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009326 else CCSHARED="+z";
9327 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009328 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009329 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009330 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009331 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009332 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009333 if test "$GCC" = "yes"
9334 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009335 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009336 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009337 SCO_SV*)
9338 if test "$GCC" = "yes"
9339 then CCSHARED="-fPIC"
9340 else CCSHARED="-Kpic -belf"
9341 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009342 IRIX*/6*) case $CC in
9343 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009344 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009345 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9349$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009351# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9353$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354if test -z "$LINKFORSHARED"
9355then
Guido van Rossum07397971997-04-29 21:49:50 +00009356 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009357 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009358 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009359 LINKFORSHARED="-Wl,-E -Wl,+s";;
9360# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009361 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009362 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009363 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009364 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009366 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009367
9368 # Issue #18075: the default maximum stack size (8MBytes) is too
9369 # small for the default recursion limit. Increase the stack size
9370 # to ensure that tests don't crash
9371 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9372
Jack Jansene578a632001-08-15 01:27:14 +00009373 if test "$enable_framework"
9374 then
Jack Jansenda49e192005-01-07 13:08:22 +00009375 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009376 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009377 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009378 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009379 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009380 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009381 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009382 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9383 then
9384 LINKFORSHARED="-Wl,--export-dynamic"
9385 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009386 SunOS/5*) case $CC in
9387 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009388 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009389 then
9390 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009391 fi;;
9392 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009393 CYGWIN*)
9394 if test $enable_shared = "no"
9395 then
9396 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9397 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009398 QNX*)
9399 # -Wl,-E causes the symbols to be added to the dynamic
9400 # symbol table so that they can be found when a module
9401 # is loaded. -N 2048K causes the stack size to be set
9402 # to 2048 kilobytes so that the stack doesn't overflow
9403 # when running test_compile.py.
9404 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9408$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009409
Michael W. Hudson54241132001-12-07 15:38:26 +00009410
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9413$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009414if test ! "$LIBRARY" = "$LDLIBRARY"
9415then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009416 case $ac_sys_system in
9417 CYGWIN*)
9418 # Cygwin needs CCSHARED when building extension DLLs
9419 # but not when building the interpreter DLL.
9420 CFLAGSFORSHARED='';;
9421 *)
9422 CFLAGSFORSHARED='$(CCSHARED)'
9423 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9426$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009427
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009428# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9429# library (with --enable-shared).
9430# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009431# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9432# if it is not required, since it creates a dependency of the shared library
9433# to LIBS. This, in turn, means that applications linking the shared libpython
9434# don't need to link LIBS explicitly. The default should be only changed
9435# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009436
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9438$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009439case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009440 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009441 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009442esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9444$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009445
9446
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9449$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009451 $as_echo_n "(cached) " >&6
9452else
9453 ac_check_lib_save_LIBS=$LIBS
9454LIBS="-lsendfile $LIBS"
9455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9456/* end confdefs.h. */
9457
9458/* Override any GCC internal prototype to avoid an error.
9459 Use char because int might match the return type of a GCC
9460 builtin and then its argument prototype would still apply. */
9461#ifdef __cplusplus
9462extern "C"
9463#endif
9464char sendfile ();
9465int
9466main ()
9467{
9468return sendfile ();
9469 ;
9470 return 0;
9471}
9472_ACEOF
9473if ac_fn_c_try_link "$LINENO"; then :
9474 ac_cv_lib_sendfile_sendfile=yes
9475else
9476 ac_cv_lib_sendfile_sendfile=no
9477fi
9478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
9480LIBS=$ac_check_lib_save_LIBS
9481fi
9482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9483$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009484if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009485 cat >>confdefs.h <<_ACEOF
9486#define HAVE_LIBSENDFILE 1
9487_ACEOF
9488
9489 LIBS="-lsendfile $LIBS"
9490
9491fi
9492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9494$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9528$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 cat >>confdefs.h <<_ACEOF
9531#define HAVE_LIBDL 1
9532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009534 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009536fi
9537 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9539$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009540if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009541 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009542else
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009544LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551#ifdef __cplusplus
9552extern "C"
9553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009554char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ;
9560 return 0;
9561}
9562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565else
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9573$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009574if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 cat >>confdefs.h <<_ACEOF
9576#define HAVE_LIBDLD 1
9577_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009578
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009579 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009581fi
9582 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009583
Georg Brandlb1441c72009-01-03 22:33:39 +00009584# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009585if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9587$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009588if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009590else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009591 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595/* Override any GCC internal prototype to avoid an error.
9596 Use char because int might match the return type of a GCC
9597 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009598#ifdef __cplusplus
9599extern "C"
9600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009601char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009602int
9603main ()
9604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ;
9607 return 0;
9608}
9609_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610for ac_lib in '' pthread rt posix4; do
9611 if test -z "$ac_lib"; then
9612 ac_res="none required"
9613 else
9614 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009615 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009620rm -f core conftest.err conftest.$ac_objext \
9621 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009622 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625done
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628else
9629 ac_cv_search_sem_init=no
9630fi
9631rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009632LIBS=$ac_func_search_save_LIBS
9633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9635$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009637if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009639
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009640fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009641 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009642 # posix4 on Solaris 2.6
9643 # pthread (first!) on Linux
9644fi
9645
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9648$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009649if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651else
9652 ac_check_lib_save_LIBS=$LIBS
9653LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657/* Override any GCC internal prototype to avoid an error.
9658 Use char because int might match the return type of a GCC
9659 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009660#ifdef __cplusplus
9661extern "C"
9662#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009664int
9665main ()
9666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009673 ac_cv_lib_intl_textdomain=yes
9674else
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679LIBS=$ac_check_lib_save_LIBS
9680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9682$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009684
Matthias Kloseb9621712010-04-24 17:59:49 +00009685$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009686
Brett Cannonc6d936e2009-06-07 20:09:53 +00009687 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009688fi
9689
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009690
9691# checks for system dependent C++ extensions support
9692case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9694$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009696/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009697
Georg Brandl59e87bd2011-02-15 19:48:59 +00009698 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009699int
9700main ()
9701{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009702loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ;
9704 return 0;
9705}
Matthias Kloseb159a552010-04-25 21:00:44 +00009706
Martin v. Löwis11437992002-04-12 09:54:03 +00009707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009708if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009709
Matthias Kloseb159a552010-04-25 21:00:44 +00009710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Matthias Kloseb159a552010-04-25 21:00:44 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009714$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009715
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009716else
Matthias Kloseb159a552010-04-25 21:00:44 +00009717
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009719$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009720
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722rm -f core conftest.err conftest.$ac_objext \
9723 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009724 *) ;;
9725esac
9726
Christian Heimes985ecdc2013-11-20 11:46:18 +01009727# check for systems that require aligned memory access
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9729$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009730if ${ac_cv_aligned_required+:} false; then :
9731 $as_echo_n "(cached) " >&6
9732else
9733 if test "$cross_compiling" = yes; then :
9734 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009735else
9736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9737/* end confdefs.h. */
9738
9739int main()
9740{
9741 char s[16];
9742 int i, *p1, *p2;
9743 for (i=0; i < 16; i++)
9744 s[i] = i;
9745 p1 = (int*)(s+1);
9746 p2 = (int*)(s+2);
9747 if (*p1 == *p2)
9748 return 1;
9749 return 0;
9750}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009751_ACEOF
9752if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009753 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009754else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009755 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009756fi
9757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9758 conftest.$ac_objext conftest.beam conftest.$ac_ext
9759fi
9760
9761
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009762fi
9763
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9765$as_echo "$ac_cv_aligned_required" >&6; }
9766if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009767
9768$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9769
9770fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009771
9772# str, bytes and memoryview hash algorithm
9773
9774
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9776$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9777
9778# Check whether --with-hash_algorithm was given.
9779if test "${with_hash_algorithm+set}" = set; then :
9780 withval=$with_hash_algorithm;
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9782$as_echo "$withval" >&6; }
9783case "$withval" in
9784 siphash24)
9785 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9786
9787 ;;
9788 fnv)
9789 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9790
9791 ;;
9792 *)
9793 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9794 ;;
9795esac
9796
9797else
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9799$as_echo "default" >&6; }
9800fi
9801
9802
Charles-François Natalid30b0222014-05-08 23:08:51 +01009803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9804$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9805
9806# Check whether --with-address_sanitizer was given.
9807if test "${with_address_sanitizer+set}" = set; then :
9808 withval=$with_address_sanitizer;
9809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9810$as_echo "$withval" >&6; }
9811BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9812LDFLAGS="-fsanitize=address $LDFLAGS"
9813
9814else
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817fi
9818
9819
Guido van Rossum70c7f481998-03-26 18:44:10 +00009820# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9822$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009823if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009827LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009837char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9856$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009858 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009859fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009860 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9862$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009863if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009865else
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009867LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871/* Override any GCC internal prototype to avoid an error.
9872 Use char because int might match the return type of a GCC
9873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874#ifdef __cplusplus
9875extern "C"
9876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009877char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
9880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ;
9883 return 0;
9884}
9885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009888else
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009891rm -f core conftest.err conftest.$ac_objext \
9892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009893LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9896$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009897if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009898 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009899fi
9900 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009901
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9903$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009906if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9909$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009910LIBS="$withval $LIBS"
9911
9912else
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915fi
9916
Guido van Rossum7f43da71994-08-01 12:15:30 +00009917
Victor Stinner8291b5e2015-03-20 16:03:14 +01009918
9919
9920
9921
9922
9923
9924
9925if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9926 if test -n "$ac_tool_prefix"; then
9927 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9928set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9930$as_echo_n "checking for $ac_word... " >&6; }
9931if ${ac_cv_path_PKG_CONFIG+:} false; then :
9932 $as_echo_n "(cached) " >&6
9933else
9934 case $PKG_CONFIG in
9935 [\\/]* | ?:[\\/]*)
9936 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9937 ;;
9938 *)
9939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9940for as_dir in $PATH
9941do
9942 IFS=$as_save_IFS
9943 test -z "$as_dir" && as_dir=.
9944 for ac_exec_ext in '' $ac_executable_extensions; do
9945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9946 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9948 break 2
9949 fi
9950done
9951 done
9952IFS=$as_save_IFS
9953
9954 ;;
9955esac
9956fi
9957PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9958if test -n "$PKG_CONFIG"; then
9959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9960$as_echo "$PKG_CONFIG" >&6; }
9961else
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
9964fi
9965
9966
9967fi
9968if test -z "$ac_cv_path_PKG_CONFIG"; then
9969 ac_pt_PKG_CONFIG=$PKG_CONFIG
9970 # Extract the first word of "pkg-config", so it can be a program name with args.
9971set dummy pkg-config; ac_word=$2
9972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9973$as_echo_n "checking for $ac_word... " >&6; }
9974if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9975 $as_echo_n "(cached) " >&6
9976else
9977 case $ac_pt_PKG_CONFIG in
9978 [\\/]* | ?:[\\/]*)
9979 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9980 ;;
9981 *)
9982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9983for as_dir in $PATH
9984do
9985 IFS=$as_save_IFS
9986 test -z "$as_dir" && as_dir=.
9987 for ac_exec_ext in '' $ac_executable_extensions; do
9988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9989 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9991 break 2
9992 fi
9993done
9994 done
9995IFS=$as_save_IFS
9996
9997 ;;
9998esac
9999fi
10000ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10001if test -n "$ac_pt_PKG_CONFIG"; then
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10003$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10004else
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
10007fi
10008
10009 if test "x$ac_pt_PKG_CONFIG" = x; then
10010 PKG_CONFIG=""
10011 else
10012 case $cross_compiling:$ac_tool_warned in
10013yes:)
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10015$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10016ac_tool_warned=yes ;;
10017esac
10018 PKG_CONFIG=$ac_pt_PKG_CONFIG
10019 fi
10020else
10021 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10022fi
10023
10024fi
10025if test -n "$PKG_CONFIG"; then
10026 _pkg_min_version=0.9.0
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10028$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10029 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10031$as_echo "yes" >&6; }
10032 else
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
10035 PKG_CONFIG=""
10036 fi
10037fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010038
10039# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10041$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010042
10043# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010045 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010046else
10047 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010048fi
10049
10050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10052$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010053
10054# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10056$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010057
10058# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010059if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010060 withval=$with_system_ffi;
10061fi
10062
10063
Zachary Waref40d4dd2016-09-17 01:25:24 -050010064if test "$ac_sys_system" = "Darwin"
10065then
10066 case "$with_system_ffi" in
10067 "")
10068 with_system_ffi="no"
10069 ;;
10070 yes|no)
10071 ;;
10072 *)
10073 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10074 ;;
10075 esac
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10077$as_echo "$with_system_ffi" >&6; }
10078else
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10080$as_echo "yes" >&6; }
10081 if test "$with_system_ffi" != ""
10082 then
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10084$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10085 fi
10086 with_system_ffi="yes"
10087fi
Zachary Ware935043d2016-09-09 17:01:21 -070010088
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010089if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010090 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10091else
10092 LIBFFI_INCLUDEDIR=""
10093fi
10094
10095
Stefan Krah60187b52012-03-23 19:06:27 +010010096# Check for use of the system libmpdec library
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10098$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10099
10100# Check whether --with-system_libmpdec was given.
10101if test "${with_system_libmpdec+set}" = set; then :
10102 withval=$with_system_libmpdec;
10103else
10104 with_system_libmpdec="no"
10105fi
10106
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10109$as_echo "$with_system_libmpdec" >&6; }
10110
Benjamin Peterson076ed002010-10-31 17:11:02 +000010111# Check for support for loadable sqlite extensions
10112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10113$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10114# Check whether --enable-loadable-sqlite-extensions was given.
10115if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10116 enableval=$enable_loadable_sqlite_extensions;
10117else
10118 enable_loadable_sqlite_extensions="no"
10119fi
10120
10121
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10123$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10124
Ned Deilyd819b932013-09-06 01:07:05 -070010125# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10126
10127
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10129$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10130
10131# Check whether --with-tcltk-includes was given.
10132if test "${with_tcltk_includes+set}" = set; then :
10133 withval=$with_tcltk_includes;
10134else
10135 with_tcltk_includes="default"
10136fi
10137
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10139$as_echo "$with_tcltk_includes" >&6; }
10140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10141$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10142
10143# Check whether --with-tcltk-libs was given.
10144if test "${with_tcltk_libs+set}" = set; then :
10145 withval=$with_tcltk_libs;
10146else
10147 with_tcltk_libs="default"
10148fi
10149
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10151$as_echo "$with_tcltk_libs" >&6; }
10152if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10153then
10154 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10155 then
10156 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10157 fi
10158 TCLTK_INCLUDES=""
10159 TCLTK_LIBS=""
10160else
10161 TCLTK_INCLUDES="$with_tcltk_includes"
10162 TCLTK_LIBS="$with_tcltk_libs"
10163fi
10164
Matthias Klose55708cc2009-04-30 08:06:49 +000010165# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10167$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010168
10169# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010170if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010171 withval=$with_dbmliborder;
10172if test x$with_dbmliborder = xyes
10173then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010174as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010175else
10176 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10177 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10178 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010179 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010180 fi
10181 done
10182fi
10183fi
10184
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10186$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010187
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010188# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010189
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010190USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
10194# Templates for things AC_DEFINEd more than once.
10195# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010196
10197
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
Matthias Kloseb9621712010-04-24 17:59:49 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10200$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204 withval=$with_threads;
10205fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010206
10207
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010208# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 withval=$with_thread; with_threads=$with_thread
10213fi
10214
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010215
10216if test -z "$with_threads"
10217then with_threads="yes"
10218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10220$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010221
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010222
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010223if test "$with_threads" = "no"
10224then
10225 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010226elif test "$ac_cv_pthread_is_default" = yes
10227then
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010229
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010230 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010232
10233 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235elif test "$ac_cv_kpthread" = "yes"
10236then
10237 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010238 if test "$ac_cv_cxx_thread" = "yes"; then
10239 CXX="$CXX -Kpthread"
10240 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010243 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010244 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010245elif test "$ac_cv_kthread" = "yes"
10246then
10247 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010248 if test "$ac_cv_cxx_thread" = "yes"; then
10249 CXX="$CXX -Kthread"
10250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010252
10253 posix_threads=yes
10254 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010255elif test "$ac_cv_pthread" = "yes"
10256then
10257 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010258 if test "$ac_cv_cxx_thread" = "yes"; then
10259 CXX="$CXX -pthread"
10260 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010262
10263 posix_threads=yes
10264 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010265else
10266 if test ! -z "$with_threads" -a -d "$with_threads"
10267 then LDFLAGS="$LDFLAGS -L$with_threads"
10268 fi
10269 if test ! -z "$withval" -a -d "$withval"
10270 then LDFLAGS="$LDFLAGS -L$withval"
10271 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010272
10273 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010274 # define _POSIX_THREADS in unistd.h. Some apparently don't
10275 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10277$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010279/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010280
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010281#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010282#ifdef _POSIX_THREADS
10283yes
10284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010285
10286_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010289 unistd_defines_pthreads=yes
10290else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010291 unistd_defines_pthreads=no
10292fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010293rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10296$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010299
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010300 # Just looking for pthread_create in libpthread is not enough:
10301 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10302 # So we really have to include pthread.h, and then link.
10303 _libs=$LIBS
10304 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10306$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010309
10310#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010311#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010312
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010313void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010314int
10315main ()
10316{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010317
10318pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10326$as_echo "yes" >&6; }
10327 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010328
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010329 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010330 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010331else
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010333 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010335if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010337
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010338 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010339 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010340else
Guido van Rossumad678af1998-10-02 14:42:15 +000010341
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10343$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010344if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010346else
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010348LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352/* Override any GCC internal prototype to avoid an error.
10353 Use char because int might match the return type of a GCC
10354 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010355#ifdef __cplusplus
10356extern "C"
10357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010358char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010359int
10360main ()
10361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010362return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ;
10364 return 0;
10365}
10366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010369else
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010372rm -f core conftest.err conftest.$ac_objext \
10373 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010374LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10377$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010378if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010380
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010381 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010382 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010383 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010384else
Greg Steinadf63d62000-07-05 10:38:09 +000010385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10387$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010388if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010390else
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010392LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396/* Override any GCC internal prototype to avoid an error.
10397 Use char because int might match the return type of a GCC
10398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010399#ifdef __cplusplus
10400extern "C"
10401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010402char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010403int
10404main ()
10405{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ;
10408 return 0;
10409}
10410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010411if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010413else
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010416rm -f core conftest.err conftest.$ac_objext \
10417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010418LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10421$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010422if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010424
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010425 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010426 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010427 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010428else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010429
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10431$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010434else
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010436LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440/* Override any GCC internal prototype to avoid an error.
10441 Use char because int might match the return type of a GCC
10442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010446char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010447int
10448main ()
10449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ;
10452 return 0;
10453}
10454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010460rm -f core conftest.err conftest.$ac_objext \
10461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010462LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10465$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010466if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010468
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010469 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010470 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010471 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010472else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010473
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10475$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010476if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010478else
Martin v. Löwis11437992002-04-12 09:54:03 +000010479 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010480LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484/* Override any GCC internal prototype to avoid an error.
10485 Use char because int might match the return type of a GCC
10486 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487#ifdef __cplusplus
10488extern "C"
10489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010490char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010491int
10492main ()
10493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ;
10496 return 0;
10497}
10498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010501else
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010504rm -f core conftest.err conftest.$ac_objext \
10505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010506LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10509$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010510if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010513 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010514 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010515 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010516else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010517
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010519fi
10520
Guido van Rossum627b2d71993-12-24 10:39:16 +000010521
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010522fi
10523
Guido van Rossum0be3e491997-05-22 20:33:33 +000010524fi
10525
Guido van Rossum49545951997-12-02 19:28:29 +000010526fi
10527
Guido van Rossumb93a8621998-05-07 13:27:32 +000010528fi
10529
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010531rm -f core conftest.err conftest.$ac_objext \
10532 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10535$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010536if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010538else
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010540LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544/* Override any GCC internal prototype to avoid an error.
10545 Use char because int might match the return type of a GCC
10546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010547#ifdef __cplusplus
10548extern "C"
10549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010550char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010551int
10552main ()
10553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ;
10556 return 0;
10557}
10558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010559if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010561else
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010564rm -f core conftest.err conftest.$ac_objext \
10565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010566LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10569$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010570if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572
Martin v. Löwis130fb172001-07-19 11:00:41 +000010573 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010574 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010575 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010576fi
10577
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010578
Neal Norwitza978ab02002-11-02 16:58:05 +000010579 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10581$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010584else
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010586LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590/* Override any GCC internal prototype to avoid an error.
10591 Use char because int might match the return type of a GCC
10592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010593#ifdef __cplusplus
10594extern "C"
10595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010596char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010597int
10598main ()
10599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 ;
10602 return 0;
10603}
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610rm -f core conftest.err conftest.$ac_objext \
10611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10615$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010616if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010618
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010619 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010620 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010621 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010622fi
10623
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010624 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010626
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010627if test "$posix_threads" = "yes"; then
10628 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631
10632 fi
10633
10634 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10635 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010636 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010637$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010638
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639 ;;
10640 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010641$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642
10643 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010644 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010646
10647 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648 esac
10649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10651$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010652 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654else
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 ac_cv_pthread_system_supported=no
10657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010659/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010660
10661 #include <stdio.h>
10662 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663 void *foo(void *parm) {
10664 return NULL;
10665 }
10666 main() {
10667 pthread_attr_t attr;
10668 pthread_t id;
10669 if (pthread_attr_init(&attr)) exit(-1);
10670 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10671 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10672 exit(0);
10673 }
10674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676 ac_cv_pthread_system_supported=yes
10677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685fi
10686
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10688$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689 if test "$ac_cv_pthread_system_supported" = "yes"; then
10690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692
10693 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010694 for ac_func in pthread_sigmask
10695do :
10696 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010697if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010699#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010701 case $ac_sys_system in
10702 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010703
Matthias Kloseb9621712010-04-24 17:59:49 +000010704$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010705
10706 ;;
10707 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708fi
10709done
10710
Christian Heimesf77b4b22013-08-21 13:26:05 +020010711 for ac_func in pthread_atfork
10712do :
10713 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10714if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10715 cat >>confdefs.h <<_ACEOF
10716#define HAVE_PTHREAD_ATFORK 1
10717_ACEOF
10718
10719fi
10720done
10721
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010722fi
10723
10724
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10728$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010730if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10734$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735 ipv6=no
10736 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10738$as_echo "yes" >&6; }
10739 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740
10741 ipv6=yes
10742 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744else
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748 /* AF_INET6 available check */
10749#include <sys/types.h>
10750#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010751int
10752main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010754int domain = AF_INET6;
10755 ;
10756 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757}
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010759if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10762$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010764
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765else
Matthias Kloseb159a552010-04-25 21:00:44 +000010766
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010774if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10776$as_echo_n "checking if RFC2553 API is available... " >&6; }
10777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010778/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010779
10780 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010781#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010782int
10783main ()
10784{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010785struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 ;
10788 return 0;
10789}
Matthias Kloseb159a552010-04-25 21:00:44 +000010790
Martin v. Löwis11437992002-04-12 09:54:03 +000010791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010792if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010793
10794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010795$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010796 ipv6=yes
10797
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010798else
Matthias Kloseb159a552010-04-25 21:00:44 +000010799
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010802 ipv6=no
10803
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010806fi
10807
10808if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010810
10811fi
10812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813fi
10814
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815
10816ipv6type=unknown
10817ipv6lib=none
10818ipv6trylibc=no
10819
10820if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10822$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010823 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10824 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825 case $i in
10826 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010828/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010829
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830#include <netinet/in.h>
10831#ifdef IPV6_INRIA_VERSION
10832yes
10833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010834_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010837 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840
10841 ;;
10842 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846#include <netinet/in.h>
10847#ifdef __KAME__
10848yes
10849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010850_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853 ipv6type=$i;
10854 ipv6lib=inet6
10855 ipv6libdir=/usr/local/v6/lib
10856 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010858rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859
10860 ;;
10861 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865#include <features.h>
10866#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10867yes
10868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872 ipv6type=$i;
10873 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010875rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010876
10877 ;;
10878 linux-inet6)
10879 if test -d /usr/inet6; then
10880 ipv6type=$i
10881 ipv6lib=inet6
10882 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010883 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884 fi
10885 ;;
10886 solaris)
10887 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010888 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889 ipv6type=$i
10890 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891 fi
10892 fi
10893 ;;
10894 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898#include <sys/param.h>
10899#ifdef _TOSHIBA_INET6
10900yes
10901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6type=$i;
10906 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010907 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010909rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910
10911 ;;
10912 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010914/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010915
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916#include </usr/local/v6/include/sys/v6config.h>
10917#ifdef __V6D__
10918yes
10919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010920_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923 ipv6type=$i;
10924 ipv6lib=v6;
10925 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010926 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010928rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929
10930 ;;
10931 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010933/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935#include <sys/param.h>
10936#ifdef _ZETA_MINAMI_INET6
10937yes
10938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010939_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942 ipv6type=$i;
10943 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010944 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010946rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947
10948 ;;
10949 esac
10950 if test "$ipv6type" != "unknown"; then
10951 break
10952 fi
10953 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10955$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956fi
10957
10958if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10959 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10960 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10961 echo "using lib$ipv6lib"
10962 else
10963 if test $ipv6trylibc = "yes"; then
10964 echo "using libc"
10965 else
10966 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10967 echo "You need to fetch lib$ipv6lib.a from appropriate"
10968 echo 'ipv6 kit and compile beforehand.'
10969 exit 1
10970 fi
10971 fi
10972fi
10973
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10975$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h. */
10978 /* CAN_RAW_FD_FRAMES available check */
10979#include <linux/can/raw.h>
10980int
10981main ()
10982{
10983int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988if ac_fn_c_try_compile "$LINENO"; then :
10989
10990
10991$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10992
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10994$as_echo "yes" >&6; }
10995
10996else
10997
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10999$as_echo "no" >&6; }
11000
11001fi
11002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11003
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011004# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11006$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011009if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010 withval=$with_doc_strings;
11011fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011012
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011013
11014if test -z "$with_doc_strings"
11015then with_doc_strings="yes"
11016fi
11017if test "$with_doc_strings" != "no"
11018then
11019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011021
11022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11024$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011025
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011026# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11028$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011031if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032 withval=$with_pymalloc;
11033fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011034
Neil Schemenauera35c6882001-02-27 04:45:05 +000011035
Neil Schemenauer16c22972002-03-22 15:34:49 +000011036if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011037then
11038 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011039fi
11040if test "$with_pymalloc" != "no"
11041then
Martin v. Löwis11437992002-04-12 09:54:03 +000011042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011044
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011045 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11048$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011049
Benjamin Peterson05159c42009-12-03 03:01:27 +000011050# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11052$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011053
11054# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011055if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011056 withval=$with_valgrind;
11057else
11058 with_valgrind=no
11059fi
11060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11062$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011063if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 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 +020011065if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011068
11069else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011070 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011071
11072fi
11073
11074
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011075 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011076fi
11077
Łukasz Langaa785c872016-09-09 17:37:37 -070011078# Check for DTrace support
11079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11080$as_echo_n "checking for --with-dtrace... " >&6; }
11081
11082# Check whether --with-dtrace was given.
11083if test "${with_dtrace+set}" = set; then :
11084 withval=$with_dtrace;
11085else
11086 with_dtrace=no
11087fi
11088
11089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11090$as_echo "$with_dtrace" >&6; }
11091
11092
11093
11094
11095
11096DTRACE=
11097DFLAGS=
11098DTRACE_HEADERS=
11099DTRACE_OBJS=
11100
11101if test "$with_dtrace" = "yes"
11102then
11103 # Extract the first word of "dtrace", so it can be a program name with args.
11104set dummy dtrace; ac_word=$2
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11106$as_echo_n "checking for $ac_word... " >&6; }
11107if ${ac_cv_path_DTRACE+:} false; then :
11108 $as_echo_n "(cached) " >&6
11109else
11110 case $DTRACE in
11111 [\\/]* | ?:[\\/]*)
11112 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11113 ;;
11114 *)
11115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11116for as_dir in $PATH
11117do
11118 IFS=$as_save_IFS
11119 test -z "$as_dir" && as_dir=.
11120 for ac_exec_ext in '' $ac_executable_extensions; do
11121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11122 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11124 break 2
11125 fi
11126done
11127 done
11128IFS=$as_save_IFS
11129
11130 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11131 ;;
11132esac
11133fi
11134DTRACE=$ac_cv_path_DTRACE
11135if test -n "$DTRACE"; then
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11137$as_echo "$DTRACE" >&6; }
11138else
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
11141fi
11142
11143
11144 if test "$DTRACE" = "not found"; then
11145 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11146 fi
11147
11148$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11149
11150 DTRACE_HEADERS="Include/pydtrace_probes.h"
11151
11152 # On OS X, DTrace providers do not need to be explicitly compiled and
11153 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11154 # generation flag '-G'. We check for presence of this flag, rather than
11155 # hardcoding support by OS, in the interest of robustness.
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11157$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11158if ${ac_cv_dtrace_link+:} false; then :
11159 $as_echo_n "(cached) " >&6
11160else
11161 ac_cv_dtrace_link=no
11162 echo 'BEGIN' > conftest.d
11163 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11164 ac_cv_dtrace_link=yes
11165
11166fi
11167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11168$as_echo "$ac_cv_dtrace_link" >&6; }
11169 if test "$ac_cv_dtrace_link" = "yes"; then
11170 DTRACE_OBJS="Python/pydtrace.o"
11171 fi
11172fi
11173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011174# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011175
Guido van Rossum98935bf2001-09-05 19:13:16 +000011176DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177
Guido van Rossume97ee181999-12-20 21:27:22 +000011178# the dlopen() function means we might want to use dynload_shlib.o. some
11179# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011180for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011181do :
11182 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011183if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011186_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011187
Guido van Rossume97ee181999-12-20 21:27:22 +000011188fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011189done
Guido van Rossume97ee181999-12-20 21:27:22 +000011190
Michael W. Hudson54241132001-12-07 15:38:26 +000011191
Guido van Rossume97ee181999-12-20 21:27:22 +000011192# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11193# loading of modules.
11194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11196$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011197if test -z "$DYNLOADFILE"
11198then
11199 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011200 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11201 if test "$ac_cv_func_dlopen" = yes
11202 then DYNLOADFILE="dynload_shlib.o"
11203 else DYNLOADFILE="dynload_aix.o"
11204 fi
11205 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011206 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011207 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11208 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011209 *)
11210 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11211 # out any dynamic loading
11212 if test "$ac_cv_func_dlopen" = yes
11213 then DYNLOADFILE="dynload_shlib.o"
11214 else DYNLOADFILE="dynload_stub.o"
11215 fi
11216 ;;
11217 esac
11218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11220$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011221if test "$DYNLOADFILE" != "dynload_stub.o"
11222then
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011225
11226fi
11227
Neil Schemenauer4e425612001-06-19 15:44:15 +000011228# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11229
Michael W. Hudson54241132001-12-07 15:38:26 +000011230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11232$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011233if test -z "$MACHDEP_OBJS"
11234then
Jack Jansene578a632001-08-15 01:27:14 +000011235 MACHDEP_OBJS=$extra_machdep_objs
11236else
11237 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011238fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011239if test -z "$MACHDEP_OBJS"; then
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11241$as_echo "none" >&6; }
11242else
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11244$as_echo "$MACHDEP_OBJS" >&6; }
11245fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011246
Guido van Rossum627b2d71993-12-24 10:39:16 +000011247# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011248for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011249 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011250 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011251 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011252 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011253 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011254 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011255 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011256 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011257 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011258 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011259 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011260 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011261 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011262 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11263 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011264 sigaction sigaltstack siginterrupt sigpending sigrelse \
11265 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011266 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011267 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011268 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011269do :
11270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011276
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011277fi
11278done
11279
Michael W. Hudson54241132001-12-07 15:38:26 +000011280
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011281ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11282 #include <dirent.h>
11283"
11284if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11285
11286$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11287
11288fi
11289
11290
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291# For some functions, having a definition is not sufficient, since
11292# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11294$as_echo_n "checking for chroot... " >&6; }
11295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011297#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011298int
11299main ()
11300{
11301void *x=chroot
11302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309
Matthias Kloseb159a552010-04-25 21:00:44 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312else
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315
11316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11319$as_echo_n "checking for link... " >&6; }
11320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323int
11324main ()
11325{
11326void *x=link
11327 ;
11328 return 0;
11329}
11330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334
Matthias Kloseb159a552010-04-25 21:00:44 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011337else
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340
11341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11344$as_echo_n "checking for symlink... " >&6; }
11345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011347#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011348int
11349main ()
11350{
11351void *x=symlink
11352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011359
Matthias Kloseb159a552010-04-25 21:00:44 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011362else
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011365
11366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11369$as_echo_n "checking for fchdir... " >&6; }
11370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011371/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011372#include <unistd.h>
11373int
11374main ()
11375{
11376void *x=fchdir
11377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384
Matthias Kloseb159a552010-04-25 21:00:44 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390
11391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11394$as_echo_n "checking for fsync... " >&6; }
11395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011396/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011397#include <unistd.h>
11398int
11399main ()
11400{
11401void *x=fsync
11402 ;
11403 return 0;
11404}
11405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011409
Matthias Kloseb159a552010-04-25 21:00:44 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011412else
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415
11416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11419$as_echo_n "checking for fdatasync... " >&6; }
11420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011422#include <unistd.h>
11423int
11424main ()
11425{
11426void *x=fdatasync
11427 ;
11428 return 0;
11429}
11430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011431if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011434
Matthias Kloseb159a552010-04-25 21:00:44 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011437else
Matthias Kloseb9621712010-04-24 17:59:49 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011440
11441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11444$as_echo_n "checking for epoll... " >&6; }
11445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011446/* end confdefs.h. */
11447#include <sys/epoll.h>
11448int
11449main ()
11450{
11451void *x=epoll_create
11452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011459
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465
11466fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11469$as_echo_n "checking for epoll_create1... " >&6; }
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h. */
11472#include <sys/epoll.h>
11473int
11474main ()
11475{
11476void *x=epoll_create1
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481if ac_fn_c_try_compile "$LINENO"; then :
11482
11483$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11484
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11486$as_echo "yes" >&6; }
11487else
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
11490
11491fi
11492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11494$as_echo_n "checking for kqueue... " >&6; }
11495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011496/* end confdefs.h. */
11497
11498#include <sys/types.h>
11499#include <sys/event.h>
11500
11501int
11502main ()
11503{
11504int x=kqueue()
11505 ;
11506 return 0;
11507}
11508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011509if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011510
Matthias Kloseb9621712010-04-24 17:59:49 +000011511$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011512
Matthias Kloseb159a552010-04-25 21:00:44 +000011513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011515else
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11517$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518
11519fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11522$as_echo_n "checking for prlimit... " >&6; }
11523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11524/* end confdefs.h. */
11525
11526#include <sys/time.h>
11527#include <sys/resource.h>
11528
11529int
11530main ()
11531{
11532void *x=prlimit
11533 ;
11534 return 0;
11535}
11536_ACEOF
11537if ac_fn_c_try_compile "$LINENO"; then :
11538
11539$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11540
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11542$as_echo "yes" >&6; }
11543else
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
11546
11547fi
11548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11549
Martin v. Löwisd5843682002-11-21 20:41:28 +000011550# On some systems (eg. FreeBSD 5), we would find a definition of the
11551# functions ctermid_r, setgroups in the library, but no prototype
11552# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11553# address to avoid compiler warnings and potential miscompilations
11554# because of the missing prototypes.
11555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11557$as_echo_n "checking for ctermid_r... " >&6; }
11558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011559/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011560
Martin v. Löwisd5843682002-11-21 20:41:28 +000011561#include <stdio.h>
11562
Martin v. Löwisd5843682002-11-21 20:41:28 +000011563int
11564main ()
11565{
11566void* p = ctermid_r
11567 ;
11568 return 0;
11569}
11570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011574
Matthias Kloseb159a552010-04-25 21:00:44 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011576$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011577else
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011580
11581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11583
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11585$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011586if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011587 $as_echo_n "(cached) " >&6
11588else
11589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011590/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011591#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011592int
11593main ()
11594{
11595void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011596
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011597 ;
11598 return 0;
11599}
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602 ac_cv_flock_decl=yes
11603else
11604 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011605
11606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011608
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011609fi
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11611$as_echo "$ac_cv_flock_decl" >&6; }
11612if test "x${ac_cv_flock_decl}" = xyes; then
11613 for ac_func in flock
11614do :
11615 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011616if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011617 cat >>confdefs.h <<_ACEOF
11618#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011619_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620
Antoine Pitroua3000072010-09-07 14:52:42 +000011621else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011623$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011624if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011625 $as_echo_n "(cached) " >&6
11626else
11627 ac_check_lib_save_LIBS=$LIBS
11628LIBS="-lbsd $LIBS"
11629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11630/* end confdefs.h. */
11631
11632/* Override any GCC internal prototype to avoid an error.
11633 Use char because int might match the return type of a GCC
11634 builtin and then its argument prototype would still apply. */
11635#ifdef __cplusplus
11636extern "C"
11637#endif
11638char flock ();
11639int
11640main ()
11641{
11642return flock ();
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647if ac_fn_c_try_link "$LINENO"; then :
11648 ac_cv_lib_bsd_flock=yes
11649else
11650 ac_cv_lib_bsd_flock=no
11651fi
11652rm -f core conftest.err conftest.$ac_objext \
11653 conftest$ac_exeext conftest.$ac_ext
11654LIBS=$ac_check_lib_save_LIBS
11655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11657$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011658if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011659 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011660
11661
11662$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11663
11664
11665fi
11666
11667
11668fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011669done
11670
Antoine Pitroua3000072010-09-07 14:52:42 +000011671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011672
Matthias Kloseb9621712010-04-24 17:59:49 +000011673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11674$as_echo_n "checking for getpagesize... " >&6; }
11675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011677
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011678#include <unistd.h>
11679
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011680int
11681main ()
11682{
11683void* p = getpagesize
11684 ;
11685 return 0;
11686}
11687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011691
Matthias Kloseb159a552010-04-25 21:00:44 +000011692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011694else
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11696$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011697
11698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700
Victor Stinner984890f2011-11-24 13:53:38 +010011701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11702$as_echo_n "checking for broken unsetenv... " >&6; }
11703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704/* end confdefs.h. */
11705
11706#include <stdlib.h>
11707
11708int
11709main ()
11710{
11711int res = unsetenv("DUMMY")
11712 ;
11713 return 0;
11714}
11715_ACEOF
11716if ac_fn_c_try_compile "$LINENO"; then :
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11718$as_echo "no" >&6; }
11719else
11720
11721$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11722
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11724$as_echo "yes" >&6; }
11725
11726fi
11727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11728
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011729for ac_prog in true
11730do
11731 # Extract the first word of "$ac_prog", so it can be a program name with args.
11732set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011735if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011737else
11738 if test -n "$TRUE"; then
11739 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11740else
11741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11742for as_dir in $PATH
11743do
11744 IFS=$as_save_IFS
11745 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011748 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 $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 +000011750 break 2
11751 fi
11752done
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011754IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755
11756fi
11757fi
11758TRUE=$ac_cv_prog_TRUE
11759if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11761$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11764$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011765fi
11766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011767
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011768 test -n "$TRUE" && break
11769done
11770test -n "$TRUE" || TRUE="/bin/true"
11771
11772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11774$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011775if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777else
11778 ac_check_lib_save_LIBS=$LIBS
11779LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011781/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011783/* Override any GCC internal prototype to avoid an error.
11784 Use char because int might match the return type of a GCC
11785 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011786#ifdef __cplusplus
11787extern "C"
11788#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011790int
11791main ()
11792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794 ;
11795 return 0;
11796}
11797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011799 ac_cv_lib_c_inet_aton=yes
11800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011803rm -f core conftest.err conftest.$ac_objext \
11804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805LIBS=$ac_check_lib_save_LIBS
11806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11808$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011809if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011810 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11813$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011814if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816else
11817 ac_check_lib_save_LIBS=$LIBS
11818LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011820/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822/* Override any GCC internal prototype to avoid an error.
11823 Use char because int might match the return type of a GCC
11824 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011825#ifdef __cplusplus
11826extern "C"
11827#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011829int
11830main ()
11831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011832return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011833 ;
11834 return 0;
11835}
11836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011838 ac_cv_lib_resolv_inet_aton=yes
11839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842rm -f core conftest.err conftest.$ac_objext \
11843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844LIBS=$ac_check_lib_save_LIBS
11845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11847$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011848if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849 cat >>confdefs.h <<_ACEOF
11850#define HAVE_LIBRESOLV 1
11851_ACEOF
11852
11853 LIBS="-lresolv $LIBS"
11854
11855fi
11856
11857
11858fi
11859
11860
Christian Heimesd0764e22007-12-04 15:00:33 +000011861# On Tru64, chflags seems to be present, but calling it will
11862# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11864$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011865if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011869 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011872/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011873
Christian Heimesd0764e22007-12-04 15:00:33 +000011874#include <sys/stat.h>
11875#include <unistd.h>
11876int main(int argc, char*argv[])
11877{
11878 if(chflags(argv[0], 0) != 0)
11879 return 1;
11880 return 0;
11881}
Ned Deily3eb67d52011-06-28 00:00:28 -070011882
Christian Heimesd0764e22007-12-04 15:00:33 +000011883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011885 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011891fi
11892
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11896$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011897if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011899if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011900 ac_cv_have_chflags="yes"
11901else
11902 ac_cv_have_chflags="no"
11903fi
11904
11905fi
11906if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909
11910fi
11911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11913$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011914if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011918 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011921/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011922
Christian Heimesd0764e22007-12-04 15:00:33 +000011923#include <sys/stat.h>
11924#include <unistd.h>
11925int main(int argc, char*argv[])
11926{
11927 if(lchflags(argv[0], 0) != 0)
11928 return 1;
11929 return 0;
11930}
Ned Deily3eb67d52011-06-28 00:00:28 -070011931
Christian Heimesd0764e22007-12-04 15:00:33 +000011932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011933if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011934 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011940fi
11941
11942
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11945$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011946if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011949 ac_cv_have_lchflags="yes"
11950else
11951 ac_cv_have_lchflags="no"
11952fi
11953
11954fi
11955if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011958
11959fi
11960
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011961case $ac_sys_system/$ac_sys_release in
11962Darwin/*)
11963 _CUR_CFLAGS="${CFLAGS}"
11964 _CUR_LDFLAGS="${LDFLAGS}"
11965 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11966 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11967 ;;
11968esac
11969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11971$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011974else
11975 ac_check_lib_save_LIBS=$LIBS
11976LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011978/* end confdefs.h. */
11979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980/* Override any GCC internal prototype to avoid an error.
11981 Use char because int might match the return type of a GCC
11982 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011983#ifdef __cplusplus
11984extern "C"
11985#endif
11986char inflateCopy ();
11987int
11988main ()
11989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011990return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011991 ;
11992 return 0;
11993}
11994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011995if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011996 ac_cv_lib_z_inflateCopy=yes
11997else
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012000rm -f core conftest.err conftest.$ac_objext \
12001 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002LIBS=$ac_check_lib_save_LIBS
12003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12005$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012006if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007
Matthias Kloseb9621712010-04-24 17:59:49 +000012008$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012009
12010fi
12011
12012
12013case $ac_sys_system/$ac_sys_release in
12014Darwin/*)
12015 CFLAGS="${_CUR_CFLAGS}"
12016 LDFLAGS="${_CUR_LDFLAGS}"
12017 ;;
12018esac
12019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12021$as_echo_n "checking for hstrerror... " >&6; }
12022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012024
Martin v. Löwise9416172003-05-03 10:12:45 +000012025#include <netdb.h>
12026
Martin v. Löwise9416172003-05-03 10:12:45 +000012027int
12028main ()
12029{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012030void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012036
Matthias Kloseb9621712010-04-24 17:59:49 +000012037$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012038
Matthias Kloseb159a552010-04-25 21:00:44 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012044
12045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012046rm -f core conftest.err conftest.$ac_objext \
12047 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12050$as_echo_n "checking for inet_aton... " >&6; }
12051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012052/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012053
Martin v. Löwis86d66262006-02-17 08:40:11 +000012054#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012055#include <sys/socket.h>
12056#include <netinet/in.h>
12057#include <arpa/inet.h>
12058
Martin v. Löwise9416172003-05-03 10:12:45 +000012059int
12060main ()
12061{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012068
Matthias Kloseb9621712010-04-24 17:59:49 +000012069$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012070
Matthias Kloseb159a552010-04-25 21:00:44 +000012071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012072$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12075$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012076
12077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012078rm -f core conftest.err conftest.$ac_objext \
12079 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12082$as_echo_n "checking for inet_pton... " >&6; }
12083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012084/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012085
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012086#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012087#include <sys/socket.h>
12088#include <netinet/in.h>
12089#include <arpa/inet.h>
12090
Martin v. Löwise9416172003-05-03 10:12:45 +000012091int
12092main ()
12093{
12094void* p = inet_pton
12095 ;
12096 return 0;
12097}
12098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012099if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012102
Matthias Kloseb159a552010-04-25 21:00:44 +000012103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012104$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012105else
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12107$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012108
12109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012111
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012112# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12114$as_echo_n "checking for setgroups... " >&6; }
12115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012117
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012118#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012119#ifdef HAVE_GRP_H
12120#include <grp.h>
12121#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012122
Martin v. Löwisd5843682002-11-21 20:41:28 +000012123int
12124main ()
12125{
12126void* p = setgroups
12127 ;
12128 return 0;
12129}
12130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012134
Matthias Kloseb159a552010-04-25 21:00:44 +000012135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012136$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12139$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012140
12141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012144# check for openpty and forkpty
12145
12146for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012147do :
12148 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12156$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012159else
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012161LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165/* Override any GCC internal prototype to avoid an error.
12166 Use char because int might match the return type of a GCC
12167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012168#ifdef __cplusplus
12169extern "C"
12170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012171char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012172int
12173main ()
12174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 ;
12177 return 0;
12178}
12179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012187LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12190$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12196$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012199else
12200 ac_check_lib_save_LIBS=$LIBS
12201LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203/* end confdefs.h. */
12204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205/* Override any GCC internal prototype to avoid an error.
12206 Use char because int might match the return type of a GCC
12207 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012208#ifdef __cplusplus
12209extern "C"
12210#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211char openpty ();
12212int
12213main ()
12214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221 ac_cv_lib_bsd_openpty=yes
12222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012225rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227LIBS=$ac_check_lib_save_LIBS
12228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12230$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233 LIBS="$LIBS -lbsd"
12234fi
12235
12236
12237fi
12238
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239
12240fi
12241done
12242
12243for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012244do :
12245 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012246if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012248#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012249_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012250
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251else
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12253$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256else
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012258LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262/* Override any GCC internal prototype to avoid an error.
12263 Use char because int might match the return type of a GCC
12264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012265#ifdef __cplusplus
12266extern "C"
12267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012268char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012269int
12270main ()
12271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012282rm -f core conftest.err conftest.$ac_objext \
12283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012284LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12287$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012288if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012290 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12293$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012294if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012296else
12297 ac_check_lib_save_LIBS=$LIBS
12298LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012300/* end confdefs.h. */
12301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302/* Override any GCC internal prototype to avoid an error.
12303 Use char because int might match the return type of a GCC
12304 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012305#ifdef __cplusplus
12306extern "C"
12307#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308char forkpty ();
12309int
12310main ()
12311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012318 ac_cv_lib_bsd_forkpty=yes
12319else
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012322rm -f core conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324LIBS=$ac_check_lib_save_LIBS
12325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12327$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012330 LIBS="$LIBS -lbsd"
12331fi
12332
12333
12334fi
12335
Fred Drake8cef4cf2000-06-28 16:40:38 +000012336
12337fi
12338done
12339
Jack Jansendd19cf82001-12-06 22:36:17 +000012340
Christian Heimesb186d002008-03-18 15:15:01 +000012341# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012342for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012343do :
12344 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012345if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012348_ACEOF
12349
12350fi
12351done
12352
12353
Michael W. Hudson54241132001-12-07 15:38:26 +000012354# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012355for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012356do :
12357 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12358ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012359if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012362_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012363
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365done
12366
Michael W. Hudson54241132001-12-07 15:38:26 +000012367
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012368ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012369if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012370 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012371
Martin v. Löwis1142de32002-03-29 16:28:31 +000012372else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012374 *" dup2.$ac_objext "* ) ;;
12375 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012377esac
12378
Martin v. Löwis1142de32002-03-29 16:28:31 +000012379fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012380
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012381ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012382if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012383 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12384
12385else
12386 case " $LIBOBJS " in
12387 *" strdup.$ac_objext "* ) ;;
12388 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12389 ;;
12390esac
12391
12392fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012393
12394
12395for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012396do :
12397 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012398if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012403/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012405int
12406main ()
12407{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 ;
12410 return 0;
12411}
12412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012416
Guido van Rossum627b2d71993-12-24 10:39:16 +000012417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012419
Guido van Rossum627b2d71993-12-24 10:39:16 +000012420fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012421done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012422
Jack Jansen150753c2003-03-29 22:07:47 +000012423for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012424do :
12425 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012426if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012432#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012433int
12434main ()
12435{
12436setpgrp(0,0);
12437 ;
12438 return 0;
12439}
12440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012444
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012447
12448fi
12449done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012450
Thomas Wouters3a584202000-08-05 23:28:51 +000012451for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012452do :
12453 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012454if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012459/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012460#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012461int
12462main ()
12463{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 ;
12466 return 0;
12467}
12468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469if ac_fn_c_try_compile "$LINENO"; then :
12470
Guido van Rossum627b2d71993-12-24 10:39:16 +000012471else
Skip Montanaro6dead952003-09-25 14:50:04 +000012472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012478
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012480done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481
Michael W. Hudson54241132001-12-07 15:38:26 +000012482
Victor Stinnere0be4232011-10-25 13:06:09 +020012483for ac_func in clock_gettime
12484do :
12485 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12486if test "x$ac_cv_func_clock_gettime" = xyes; then :
12487 cat >>confdefs.h <<_ACEOF
12488#define HAVE_CLOCK_GETTIME 1
12489_ACEOF
12490
12491else
12492
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12494$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12495if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12496 $as_echo_n "(cached) " >&6
12497else
12498 ac_check_lib_save_LIBS=$LIBS
12499LIBS="-lrt $LIBS"
12500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501/* end confdefs.h. */
12502
12503/* Override any GCC internal prototype to avoid an error.
12504 Use char because int might match the return type of a GCC
12505 builtin and then its argument prototype would still apply. */
12506#ifdef __cplusplus
12507extern "C"
12508#endif
12509char clock_gettime ();
12510int
12511main ()
12512{
12513return clock_gettime ();
12514 ;
12515 return 0;
12516}
12517_ACEOF
12518if ac_fn_c_try_link "$LINENO"; then :
12519 ac_cv_lib_rt_clock_gettime=yes
12520else
12521 ac_cv_lib_rt_clock_gettime=no
12522fi
12523rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525LIBS=$ac_check_lib_save_LIBS
12526fi
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12528$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12529if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12530
Victor Stinner7efb8332014-08-29 15:41:08 +020012531 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012532 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12533
12534
12535$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12536
12537
12538fi
12539
12540
12541fi
12542done
12543
12544
12545for ac_func in clock_getres
12546do :
12547 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12548if test "x$ac_cv_func_clock_getres" = xyes; then :
12549 cat >>confdefs.h <<_ACEOF
12550#define HAVE_CLOCK_GETRES 1
12551_ACEOF
12552
12553else
12554
12555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12556$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12557if ${ac_cv_lib_rt_clock_getres+:} false; then :
12558 $as_echo_n "(cached) " >&6
12559else
12560 ac_check_lib_save_LIBS=$LIBS
12561LIBS="-lrt $LIBS"
12562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12563/* end confdefs.h. */
12564
12565/* Override any GCC internal prototype to avoid an error.
12566 Use char because int might match the return type of a GCC
12567 builtin and then its argument prototype would still apply. */
12568#ifdef __cplusplus
12569extern "C"
12570#endif
12571char clock_getres ();
12572int
12573main ()
12574{
12575return clock_getres ();
12576 ;
12577 return 0;
12578}
12579_ACEOF
12580if ac_fn_c_try_link "$LINENO"; then :
12581 ac_cv_lib_rt_clock_getres=yes
12582else
12583 ac_cv_lib_rt_clock_getres=no
12584fi
12585rm -f core conftest.err conftest.$ac_objext \
12586 conftest$ac_exeext conftest.$ac_ext
12587LIBS=$ac_check_lib_save_LIBS
12588fi
12589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12590$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12591if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12592
12593 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12594
12595
12596fi
12597
12598
12599fi
12600done
12601
12602
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012603for ac_func in clock_settime
12604do :
12605 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12606if test "x$ac_cv_func_clock_settime" = xyes; then :
12607 cat >>confdefs.h <<_ACEOF
12608#define HAVE_CLOCK_SETTIME 1
12609_ACEOF
12610
12611else
12612
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12614$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12615if ${ac_cv_lib_rt_clock_settime+:} false; then :
12616 $as_echo_n "(cached) " >&6
12617else
12618 ac_check_lib_save_LIBS=$LIBS
12619LIBS="-lrt $LIBS"
12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621/* end confdefs.h. */
12622
12623/* Override any GCC internal prototype to avoid an error.
12624 Use char because int might match the return type of a GCC
12625 builtin and then its argument prototype would still apply. */
12626#ifdef __cplusplus
12627extern "C"
12628#endif
12629char clock_settime ();
12630int
12631main ()
12632{
12633return clock_settime ();
12634 ;
12635 return 0;
12636}
12637_ACEOF
12638if ac_fn_c_try_link "$LINENO"; then :
12639 ac_cv_lib_rt_clock_settime=yes
12640else
12641 ac_cv_lib_rt_clock_settime=no
12642fi
12643rm -f core conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
12645LIBS=$ac_check_lib_save_LIBS
12646fi
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12648$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12649if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12650
12651 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12652
12653
12654fi
12655
12656
12657fi
12658done
12659
12660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12662$as_echo_n "checking for major... " >&6; }
12663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012664/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012665
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012666#if defined(MAJOR_IN_MKDEV)
12667#include <sys/mkdev.h>
12668#elif defined(MAJOR_IN_SYSMACROS)
12669#include <sys/sysmacros.h>
12670#else
12671#include <sys/types.h>
12672#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012673
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012674int
12675main ()
12676{
12677
12678 makedev(major(0),minor(0));
12679
12680 ;
12681 return 0;
12682}
12683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012685
12686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12690$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012691
12692else
Skip Montanaro6dead952003-09-25 14:50:04 +000012693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12695$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012696
12697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012698rm -f core conftest.err conftest.$ac_objext \
12699 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012700
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012701# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12702# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12704$as_echo_n "checking for if_nameindex... " >&6; }
12705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706/* end confdefs.h. */
12707
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012708#include <stdio.h>
12709#ifdef STDC_HEADERS
12710# include <stdlib.h>
12711# include <stddef.h>
12712#else
12713# ifdef HAVE_STDLIB_H
12714# include <stdlib.h>
12715# endif
12716#endif
12717#ifdef HAVE_SYS_SOCKET_H
12718# include <sys/socket.h>
12719#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012720#ifdef HAVE_NET_IF_H
12721# include <net/if.h>
12722#endif
12723
12724int
12725main ()
12726{
12727struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732if ac_fn_c_try_link "$LINENO"; then :
12733
12734$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12735
12736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12737$as_echo "yes" >&6; }
12738else
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12740$as_echo "no" >&6; }
12741
12742fi
12743rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext conftest.$ac_ext
12745
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012746# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12747# macro is not defined in android-ndk-r13.
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12749$as_echo_n "checking for lockf... " >&6; }
12750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752#include <unistd.h>
12753int
12754main ()
12755{
12756lockf(0, F_LOCK, 0);
12757 ;
12758 return 0;
12759}
12760_ACEOF
12761if ac_fn_c_try_link "$LINENO"; then :
12762
12763$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12764
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12766$as_echo "yes" >&6; }
12767else
12768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12769$as_echo "no" >&6; }
12770
12771fi
12772rm -f core conftest.err conftest.$ac_objext \
12773 conftest$ac_exeext conftest.$ac_ext
12774
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012775# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012776# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12778$as_echo_n "checking for getaddrinfo... " >&6; }
12779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012781
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012782#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012783#include <sys/socket.h>
12784#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012785#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787int
12788main ()
12789{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012790getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ;
12792 return 0;
12793}
12794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012795if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012796 have_getaddrinfo=yes
12797else
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012800rm -f core conftest.err conftest.$ac_objext \
12801 conftest$ac_exeext conftest.$ac_ext
12802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12803$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012804if test $have_getaddrinfo = yes
12805then
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12807$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012808 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012812
12813if test "${enable_ipv6+set}" = set; then
12814 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12815else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012816 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012817fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012820/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821
Stefan Krah19c21392012-11-22 23:47:32 +010012822#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823#include <sys/types.h>
12824#include <netdb.h>
12825#include <string.h>
12826#include <sys/socket.h>
12827#include <netinet/in.h>
12828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012829int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830{
12831 int passive, gaierr, inet4 = 0, inet6 = 0;
12832 struct addrinfo hints, *ai, *aitop;
12833 char straddr[INET6_ADDRSTRLEN], strport[16];
12834
12835 for (passive = 0; passive <= 1; passive++) {
12836 memset(&hints, 0, sizeof(hints));
12837 hints.ai_family = AF_UNSPEC;
12838 hints.ai_flags = passive ? AI_PASSIVE : 0;
12839 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012840 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12842 (void)gai_strerror(gaierr);
12843 goto bad;
12844 }
12845 for (ai = aitop; ai; ai = ai->ai_next) {
12846 if (ai->ai_addr == NULL ||
12847 ai->ai_addrlen == 0 ||
12848 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12849 straddr, sizeof(straddr), strport, sizeof(strport),
12850 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12851 goto bad;
12852 }
12853 switch (ai->ai_family) {
12854 case AF_INET:
12855 if (strcmp(strport, "54321") != 0) {
12856 goto bad;
12857 }
12858 if (passive) {
12859 if (strcmp(straddr, "0.0.0.0") != 0) {
12860 goto bad;
12861 }
12862 } else {
12863 if (strcmp(straddr, "127.0.0.1") != 0) {
12864 goto bad;
12865 }
12866 }
12867 inet4++;
12868 break;
12869 case AF_INET6:
12870 if (strcmp(strport, "54321") != 0) {
12871 goto bad;
12872 }
12873 if (passive) {
12874 if (strcmp(straddr, "::") != 0) {
12875 goto bad;
12876 }
12877 } else {
12878 if (strcmp(straddr, "::1") != 0) {
12879 goto bad;
12880 }
12881 }
12882 inet6++;
12883 break;
12884 case AF_UNSPEC:
12885 goto bad;
12886 break;
12887 default:
12888 /* another family support? */
12889 break;
12890 }
12891 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012892 freeaddrinfo(aitop);
12893 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012894 }
12895
12896 if (!(inet4 == 0 || inet4 == 2))
12897 goto bad;
12898 if (!(inet6 == 0 || inet6 == 2))
12899 goto bad;
12900
12901 if (aitop)
12902 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012903 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012904
12905 bad:
12906 if (aitop)
12907 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012908 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909}
12910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012913 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012921fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12926$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12927
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012928if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012929then
12930 if test $ipv6 = yes
12931 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932 echo 'Fatal: You must get working getaddrinfo() function.'
12933 echo ' or you can specify "--disable-ipv6"'.
12934 exit 1
12935 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012936else
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012939
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012940fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012941
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012942for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012943do :
12944 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012945if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012948_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012949
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012950fi
12951done
12952
Michael W. Hudson54241132001-12-07 15:38:26 +000012953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12956$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012957if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962#include <sys/types.h>
12963#include <sys/time.h>
12964#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966int
12967main ()
12968{
12969if ((struct tm *) 0)
12970return 0;
12971 ;
12972 return 0;
12973}
12974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012975if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12983$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012984if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987
12988fi
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12991$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012992if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997#include <sys/types.h>
12998#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Martin v. Löwis11437992002-04-12 09:54:03 +000013000int
13001main ()
13002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003struct tm tm;
13004 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013011 ac_cv_struct_tm=time.h
13012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13018$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013019if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013022
13023fi
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025ac_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 +000013026#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028"
Victor Stinnere0be4232011-10-25 13:06:09 +020013029if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013030
13031cat >>confdefs.h <<_ACEOF
13032#define HAVE_STRUCT_TM_TM_ZONE 1
13033_ACEOF
13034
13035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013041
13042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13044"
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049fi
13050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013052#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053_ACEOF
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13056$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013057if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013062#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063#if !HAVE_DECL_TZNAME
13064extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Martin v. Löwis11437992002-04-12 09:54:03 +000013067int
13068main ()
13069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076 ac_cv_var_tzname=yes
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013080rm -f core conftest.err conftest.$ac_objext \
13081 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13084$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013085 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089 fi
13090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092ac_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 +020013093if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013094
13095cat >>confdefs.h <<_ACEOF
13096#define HAVE_STRUCT_STAT_ST_RDEV 1
13097_ACEOF
13098
13099
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013100fi
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102ac_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 +020013103if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105cat >>confdefs.h <<_ACEOF
13106#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13107_ACEOF
13108
13109
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013110fi
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112ac_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 +020013113if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013114
13115cat >>confdefs.h <<_ACEOF
13116#define HAVE_STRUCT_STAT_ST_FLAGS 1
13117_ACEOF
13118
13119
13120fi
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122ac_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 +020013123if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013124
13125cat >>confdefs.h <<_ACEOF
13126#define HAVE_STRUCT_STAT_ST_GEN 1
13127_ACEOF
13128
13129
13130fi
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132ac_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 +020013133if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013134
13135cat >>confdefs.h <<_ACEOF
13136#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13137_ACEOF
13138
13139
13140fi
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142ac_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 +020013143if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013144
Martin v. Löwis11437992002-04-12 09:54:03 +000013145cat >>confdefs.h <<_ACEOF
13146#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13147_ACEOF
13148
13149
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013150fi
13151
Stefan Krah267b6392016-04-26 01:09:18 +020013152ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13153 #include <sys/types.h>
13154 #include <pwd.h>
13155
13156"
13157if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13158
13159cat >>confdefs.h <<_ACEOF
13160#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13161_ACEOF
13162
13163
13164fi
13165ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13166 #include <sys/types.h>
13167 #include <pwd.h>
13168
13169"
13170if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13171
13172cat >>confdefs.h <<_ACEOF
13173#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13174_ACEOF
13175
13176
13177fi
13178
Zachary Ware6a6967e2016-10-01 00:47:27 -050013179# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13180ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13181"
13182if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13183
13184cat >>confdefs.h <<_ACEOF
13185#define HAVE_SIGINFO_T_SI_BAND 1
13186_ACEOF
13187
13188
13189fi
13190
Michael W. Hudson54241132001-12-07 15:38:26 +000013191
Matthias Kloseb9621712010-04-24 17:59:49 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13193$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013194if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196else
Matthias Kloseb159a552010-04-25 21:00:44 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013199/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013200#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013201int
13202main ()
13203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 ;
13206 return 0;
13207}
13208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210 ac_cv_header_time_altzone=yes
13211else
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216fi
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13219$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013223
13224fi
13225
Guido van Rossumda88dad1995-01-26 00:46:29 +000013226was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13228$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013230/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231
13232#include <sys/types.h>
13233#include <sys/select.h>
13234#include <sys/time.h>
13235
Martin v. Löwis11437992002-04-12 09:54:03 +000013236int
13237main ()
13238{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239;
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 ;
13241 return 0;
13242}
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013249 was_it_defined=yes
13250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13254$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13257$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013258if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013262/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013263#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 ;
13269 return 0;
13270}
13271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273 ac_cv_struct_addrinfo=yes
13274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13278fi
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13281$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
13286fi
13287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13289$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013290if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013294/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295
13296# include <sys/types.h>
13297# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ;
13303 return 0;
13304}
13305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307 ac_cv_struct_sockaddr_storage=yes
13308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13315$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319
13320fi
13321
Christian Heimesdffa3942016-09-05 23:54:41 +020013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13323$as_echo_n "checking for sockaddr_alg... " >&6; }
13324if ${ac_cv_struct_sockaddr_alg+:} false; then :
13325 $as_echo_n "(cached) " >&6
13326else
13327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13328/* end confdefs.h. */
13329
13330# include <sys/types.h>
13331# include <sys/socket.h>
13332# include <linux/if_alg.h>
13333int
13334main ()
13335{
13336struct sockaddr_alg s
13337 ;
13338 return 0;
13339}
13340_ACEOF
13341if ac_fn_c_try_compile "$LINENO"; then :
13342 ac_cv_struct_sockaddr_alg=yes
13343else
13344 ac_cv_struct_sockaddr_alg=no
13345fi
13346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13347fi
13348
13349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13350$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13351if test $ac_cv_struct_sockaddr_alg = yes; then
13352
13353$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13354
13355fi
13356
Guido van Rossum627b2d71993-12-24 10:39:16 +000013357# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13360$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013361if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
13370static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013371test_array [0] = 0;
13372return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
13374 ;
13375 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013376}
Martin v. Löwis11437992002-04-12 09:54:03 +000013377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013379 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13386$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389
13390fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13393$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013394if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400int
13401main ()
13402{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013405 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013407 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409 char const *const *pcpcc;
13410 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 /* NEC SVR4.0.2 mips cc rejects this. */
13412 struct point {int x, y;};
13413 static struct point const zero = {0,0};
13414 /* AIX XL C 1.02.0.0 rejects this.
13415 It does not let you subtract one const X* pointer from another in
13416 an arm of an if-expression whose if-part is not a constant
13417 expression */
13418 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421 ++pcpcc;
13422 ppc = (char**) pcpcc;
13423 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013424 { /* SCO 3.2v4 cc rejects this sort of thing. */
13425 char tx;
13426 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 }
13432 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13433 int x[] = {25, 17};
13434 const int *foo = &x[0];
13435 ++foo;
13436 }
13437 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13438 typedef const int *iptr;
13439 iptr p = 0;
13440 ++p;
13441 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013442 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013444 struct s { int j; const int *ap[3]; } bx;
13445 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 }
13447 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13448 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013452#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ;
13455 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013456}
Martin v. Löwis11437992002-04-12 09:54:03 +000013457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459 ac_cv_c_const=yes
13460else
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13466$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470
13471fi
13472
Michael W. Hudson54241132001-12-07 15:38:26 +000013473
Guido van Rossumda88dad1995-01-26 00:46:29 +000013474works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13476$as_echo_n "checking for working volatile... " >&6; }
13477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480int
13481main ()
13482{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 ;
13485 return 0;
13486}
13487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013488if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013489 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013490else
Skip Montanaro6dead952003-09-25 14:50:04 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013493
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013494
Guido van Rossum627b2d71993-12-24 10:39:16 +000013495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13498$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013499
Guido van Rossumda88dad1995-01-26 00:46:29 +000013500works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13502$as_echo_n "checking for working signed char... " >&6; }
13503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013505
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013515 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013516else
Skip Montanaro6dead952003-09-25 14:50:04 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013520
Guido van Rossum7f43da71994-08-01 12:15:30 +000013521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13524$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013525
Guido van Rossumda88dad1995-01-26 00:46:29 +000013526have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13528$as_echo_n "checking for prototypes... " >&6; }
13529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013530/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013531int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013532int
13533main ()
13534{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013535return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ;
13537 return 0;
13538}
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Matthias Kloseb159a552010-04-25 21:00:44 +000013544 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13548$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549
Guido van Rossumda88dad1995-01-26 00:46:29 +000013550works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13552$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013554/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013555
13556#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013557int foo(int x, ...) {
13558 va_list va;
13559 va_start(va, x);
13560 va_arg(va, int);
13561 va_arg(va, char *);
13562 va_arg(va, double);
13563 return 0;
13564}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566int
13567main ()
13568{
Guido van Rossum90eea071996-08-30 20:58:57 +000013569return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013578
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013579 works=yes
13580
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13584$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585
Martin v. Löwisd6320502004-08-12 13:45:08 +000013586# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13588$as_echo_n "checking for socketpair... " >&6; }
13589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013590/* end confdefs.h. */
13591
13592#include <sys/types.h>
13593#include <sys/socket.h>
13594
13595int
13596main ()
13597{
13598void *x=socketpair
13599 ;
13600 return 0;
13601}
13602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013606
Matthias Kloseb159a552010-04-25 21:00:44 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013608$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13611$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013612
13613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013615
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13618$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013620/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621#include <sys/types.h>
13622#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013623int
13624main ()
13625{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626struct sockaddr x;
13627x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013628 ;
13629 return 0;
13630}
13631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013632if ac_fn_c_try_compile "$LINENO"; then :
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13634$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637
13638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13640$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013641
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013645# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013649if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13654$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013655 OLD_CFLAGS=$CFLAGS
13656 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013658/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013659
13660# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Martin v. Löwis11437992002-04-12 09:54:03 +000013662int
13663main ()
13664{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013665
13666 char *name;
13667 struct hostent *he, *res;
13668 char buffer[2048];
13669 int buflen = 2048;
13670 int h_errnop;
13671
13672 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
13674 ;
13675 return 0;
13676}
13677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013681
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13686$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013688else
Skip Montanaro6dead952003-09-25 14:50:04 +000013689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13691$as_echo "no" >&6; }
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13693$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013695/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013696
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013697# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Martin v. Löwis11437992002-04-12 09:54:03 +000013699int
13700main ()
13701{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013702
13703 char *name;
13704 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013705 char buffer[2048];
13706 int buflen = 2048;
13707 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013708
Matthias Kloseb159a552010-04-25 21:00:44 +000013709 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013710
13711 ;
13712 return 0;
13713}
13714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013718
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
Matthias Kloseb159a552010-04-25 21:00:44 +000013720$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13723$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013725else
Skip Montanaro6dead952003-09-25 14:50:04 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13728$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13730$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732/* end confdefs.h. */
13733
13734# include <netdb.h>
13735
13736int
13737main ()
13738{
13739
13740 char *name;
13741 struct hostent *he;
13742 struct hostent_data data;
13743
13744 (void) gethostbyname_r(name, he, &data);
13745
13746 ;
13747 return 0;
13748}
13749_ACEOF
13750if ac_fn_c_try_compile "$LINENO"; then :
13751
13752 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13753
13754
13755$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13756
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13758$as_echo "yes" >&6; }
13759
13760else
13761
13762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13763$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013767
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013773 CFLAGS=$OLD_CFLAGS
13774
13775else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 for ac_func in gethostbyname
13778do :
13779 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013780if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013782#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013783_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013785fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013786done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013787
Michael W. Hudson54241132001-12-07 15:38:26 +000013788
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013789fi
13790
Michael W. Hudson54241132001-12-07 15:38:26 +000013791
13792
13793
13794
13795
13796
Guido van Rossum627b2d71993-12-24 10:39:16 +000013797# checks for system services
13798# (none yet)
13799
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013801ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013802if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013803
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13806$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809else
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013811LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815/* Override any GCC internal prototype to avoid an error.
13816 Use char because int might match the return type of a GCC
13817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013818#ifdef __cplusplus
13819extern "C"
13820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013821char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013822int
13823main ()
13824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ;
13827 return 0;
13828}
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013835rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013837LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13840$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013841if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 cat >>confdefs.h <<_ACEOF
13843#define HAVE_LIBIEEE 1
13844_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013845
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013846 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013847
Guido van Rossum627b2d71993-12-24 10:39:16 +000013848fi
13849
Michael W. Hudson54241132001-12-07 15:38:26 +000013850
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013851fi
13852
Michael W. Hudson54241132001-12-07 15:38:26 +000013853
Guido van Rossum7f253911997-05-09 02:42:48 +000013854# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13856$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013859if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013861if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013862then
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13867$as_echo "yes" >&6; }
13868else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13869$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013870fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13873$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874fi
13875
Guido van Rossum7f253911997-05-09 02:42:48 +000013876
Guido van Rossum7f43da71994-08-01 12:15:30 +000013877# check for --with-libm=...
13878
Guido van Rossum563e7081996-09-10 18:20:48 +000013879case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013880Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013881*) LIBM=-lm
13882esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13884$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013889if test "$withval" = no
13890then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13892$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013893elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013894then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13896$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013897else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013898fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13901$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902fi
13903
Guido van Rossum7f43da71994-08-01 12:15:30 +000013904
13905# check for --with-libc=...
13906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13908$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013911if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013913if test "$withval" = no
13914then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13916$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013917elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013918then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13920$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013921else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013922fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13925$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926fi
13927
Guido van Rossum7f43da71994-08-01 12:15:30 +000013928
Stefan Krah1919b7e2012-03-21 18:25:23 +010013929# **************************************
13930# * Check for gcc x64 inline assembler *
13931# **************************************
13932
13933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13934$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13936/* end confdefs.h. */
13937
13938int
13939main ()
13940{
13941
13942 __asm__ __volatile__ ("movq %rcx, %rax");
13943
13944 ;
13945 return 0;
13946}
13947_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013948if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013949 have_gcc_asm_for_x64=yes
13950else
13951 have_gcc_asm_for_x64=no
13952fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013953rm -f core conftest.err conftest.$ac_objext \
13954 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13956$as_echo "$have_gcc_asm_for_x64" >&6; }
13957if test "$have_gcc_asm_for_x64" = yes
13958then
13959
13960$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13961
13962fi
13963
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964# **************************************************
13965# * Check for various properties of floating point *
13966# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13969$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013970if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972else
13973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013975 ac_cv_little_endian_double=no
13976else
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013978/* end confdefs.h. */
13979
13980#include <string.h>
13981int main() {
13982 double x = 9006104071832581.0;
13983 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13984 return 0;
13985 else
13986 return 1;
13987}
13988
13989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013990if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013991 ac_cv_little_endian_double=yes
13992else
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997fi
13998
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013999fi
14000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14002$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003if test "$ac_cv_little_endian_double" = yes
14004then
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014007
14008fi
14009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14011$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014012if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014else
14015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017 ac_cv_big_endian_double=no
14018else
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014020/* end confdefs.h. */
14021
14022#include <string.h>
14023int main() {
14024 double x = 9006104071832581.0;
14025 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14026 return 0;
14027 else
14028 return 1;
14029}
14030
14031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014032if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014033 ac_cv_big_endian_double=yes
14034else
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014039fi
14040
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014041fi
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14044$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014045if test "$ac_cv_big_endian_double" = yes
14046then
14047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049
14050fi
14051
14052# Some ARM platforms use a mixed-endian representation for doubles.
14053# While Python doesn't currently have full support for these platforms
14054# (see e.g., issue 1762561), we can at least make sure that float <-> string
14055# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14057$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014058if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014060else
14061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014063 ac_cv_mixed_endian_double=no
14064else
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014066/* end confdefs.h. */
14067
14068#include <string.h>
14069int main() {
14070 double x = 9006104071832581.0;
14071 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14072 return 0;
14073 else
14074 return 1;
14075}
14076
14077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014078if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014079 ac_cv_mixed_endian_double=yes
14080else
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14084 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014085fi
14086
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087fi
14088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14090$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091if test "$ac_cv_mixed_endian_double" = yes
14092then
14093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014095
14096fi
14097
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014098# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014099# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014100# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014101# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014102# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014103# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014104
14105# This inline assembler syntax may also work for suncc and icc,
14106# so we try it on all platforms.
14107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14109$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014111/* end confdefs.h. */
14112
14113int
14114main ()
14115{
14116
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014117 unsigned short cw;
14118 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14119 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014120
14121 ;
14122 return 0;
14123}
14124_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014125if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014126 have_gcc_asm_for_x87=yes
14127else
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014129fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014130rm -f core conftest.err conftest.$ac_objext \
14131 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14133$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014134if test "$have_gcc_asm_for_x87" = yes
14135then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014136
Matthias Kloseb9621712010-04-24 17:59:49 +000014137$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014138
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014140
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14142$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14144/* end confdefs.h. */
14145
14146int
14147main ()
14148{
14149
14150 unsigned int fpcr;
14151 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14152 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14153
14154 ;
14155 return 0;
14156}
14157_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014158if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014159 have_gcc_asm_for_mc68881=yes
14160else
14161 have_gcc_asm_for_mc68881=no
14162fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014163rm -f core conftest.err conftest.$ac_objext \
14164 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14166$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14167if test "$have_gcc_asm_for_mc68881" = yes
14168then
14169
14170$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14171
14172fi
14173
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014174# Detect whether system arithmetic is subject to x87-style double
14175# rounding issues. The result of this test has little meaning on non
14176# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14177# mode is round-to-nearest and double rounding issues are present, and
14178# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14180$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014181# $BASECFLAGS may affect the result
14182ac_save_cc="$CC"
14183CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014185 ac_cv_x87_double_rounding=no
14186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014188/* end confdefs.h. */
14189
14190#include <stdlib.h>
14191#include <math.h>
14192int main() {
14193 volatile double x, y, z;
14194 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14195 x = 0.99999999999999989; /* 1-2**-53 */
14196 y = 1./x;
14197 if (y != 1.)
14198 exit(0);
14199 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14200 x = 1e16;
14201 y = 2.99999;
14202 z = x + y;
14203 if (z != 1e16+4.)
14204 exit(0);
14205 /* both tests show evidence of double rounding */
14206 exit(1);
14207}
14208
14209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211 ac_cv_x87_double_rounding=no
14212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +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
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014217fi
14218
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014219CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14221$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014222if test "$ac_cv_x87_double_rounding" = yes
14223then
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014226
14227fi
14228
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014229# ************************************
14230# * Check for mathematical functions *
14231# ************************************
14232
14233LIBS_SAVE=$LIBS
14234LIBS="$LIBS $LIBM"
14235
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14237do :
14238 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14239ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014240if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014241 cat >>confdefs.h <<_ACEOF
14242#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14243_ACEOF
14244
14245fi
14246done
14247
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014248for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014249do :
14250 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14251ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014252if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014253 cat >>confdefs.h <<_ACEOF
14254#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14255_ACEOF
14256
14257fi
14258done
14259
14260ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14261"
Victor Stinnere0be4232011-10-25 13:06:09 +020014262if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014263 ac_have_decl=1
14264else
14265 ac_have_decl=0
14266fi
14267
14268cat >>confdefs.h <<_ACEOF
14269#define HAVE_DECL_ISINF $ac_have_decl
14270_ACEOF
14271ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14272"
Victor Stinnere0be4232011-10-25 13:06:09 +020014273if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014274 ac_have_decl=1
14275else
14276 ac_have_decl=0
14277fi
14278
14279cat >>confdefs.h <<_ACEOF
14280#define HAVE_DECL_ISNAN $ac_have_decl
14281_ACEOF
14282ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14283"
Victor Stinnere0be4232011-10-25 13:06:09 +020014284if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014285 ac_have_decl=1
14286else
14287 ac_have_decl=0
14288fi
14289
14290cat >>confdefs.h <<_ACEOF
14291#define HAVE_DECL_ISFINITE $ac_have_decl
14292_ACEOF
14293
14294
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014295# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14296# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14298$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014299if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014300 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014301else
14302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014304 ac_cv_tanh_preserves_zero_sign=no
14305else
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014307/* end confdefs.h. */
14308
14309#include <math.h>
14310#include <stdlib.h>
14311int main() {
14312 /* return 0 if either negative zeros don't exist
14313 on this platform or if negative zeros exist
14314 and tanh(-0.) == -0. */
14315 if (atan2(0., -1.) == atan2(-0., -1.) ||
14316 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14317 else exit(1);
14318}
14319
14320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014321if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014322 ac_cv_tanh_preserves_zero_sign=yes
14323else
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014328fi
14329
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014330fi
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14333$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014334if test "$ac_cv_tanh_preserves_zero_sign" = yes
14335then
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014338
14339fi
14340
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014341if test "$ac_cv_func_log1p" = yes
14342then
14343 # On some versions of AIX, log1p(-0.) returns 0. instead of
14344 # -0. See issue #9920.
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14346$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014347 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014348 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014349else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014350
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014351 if test "$cross_compiling" = yes; then :
14352 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014353else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14355/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014356
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014357 #include <math.h>
14358 #include <stdlib.h>
14359 int main() {
14360 /* Fail if the signs of log1p(-0.) and -0. can be
14361 distinguished. */
14362 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14363 return 0;
14364 else
14365 return 1;
14366 }
14367
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014368_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014369if ac_fn_c_try_run "$LINENO"; then :
14370 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014371else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014372 ac_cv_log1p_drops_zero_sign=yes
14373fi
14374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14375 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014376fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014377
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014378fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014379
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14381$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14382fi
14383if test "$ac_cv_log1p_drops_zero_sign" = yes
14384then
14385
14386$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14387
14388fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014389
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014390LIBS=$LIBS_SAVE
14391
Mark Dickinsona614f042009-11-28 12:48:43 +000014392# For multiprocessing module, check that sem_open
14393# actually works. For FreeBSD versions <= 7.2,
14394# the kernel module that provides POSIX semaphores
14395# isn't loaded by default, so an attempt to call
14396# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14398$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014399if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014401else
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014403 ac_cv_posix_semaphores_enabled=yes
14404else
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014406/* end confdefs.h. */
14407
14408#include <unistd.h>
14409#include <fcntl.h>
14410#include <stdio.h>
14411#include <semaphore.h>
14412#include <sys/stat.h>
14413
14414int main(void) {
14415 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14416 if (a == SEM_FAILED) {
14417 perror("sem_open");
14418 return 1;
14419 }
14420 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014421 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014422 return 0;
14423}
14424
14425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014426if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014427 ac_cv_posix_semaphores_enabled=yes
14428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14432 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014433fi
14434
14435
Mark Dickinsona614f042009-11-28 12:48:43 +000014436fi
14437
Matthias Kloseb9621712010-04-24 17:59:49 +000014438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14439$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014440if test $ac_cv_posix_semaphores_enabled = no
14441then
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014444
14445fi
14446
Mark Dickinson10683072009-04-18 21:18:19 +000014447# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14449$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014450if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014452else
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014454 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014457/* end confdefs.h. */
14458
14459#include <unistd.h>
14460#include <fcntl.h>
14461#include <stdio.h>
14462#include <semaphore.h>
14463#include <sys/stat.h>
14464
14465int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014466 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014467 int count;
14468 int res;
14469 if(a==SEM_FAILED){
14470 perror("sem_open");
14471 return 1;
14472
14473 }
14474 res = sem_getvalue(a, &count);
14475 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014476 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014477 return res==-1 ? 1 : 0;
14478}
14479
Mark Dickinson10683072009-04-18 21:18:19 +000014480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014481if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014482 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014483else
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14487 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014488fi
14489
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014490
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014491fi
14492
Matthias Kloseb9621712010-04-24 17:59:49 +000014493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14494$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014495if test $ac_cv_broken_sem_getvalue = yes
14496then
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014499
14500fi
14501
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014502ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14503"
14504if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14505 ac_have_decl=1
14506else
14507 ac_have_decl=0
14508fi
14509
14510cat >>confdefs.h <<_ACEOF
14511#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14512_ACEOF
14513ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14514"
14515if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14516 ac_have_decl=1
14517else
14518 ac_have_decl=0
14519fi
14520
14521cat >>confdefs.h <<_ACEOF
14522#define HAVE_DECL_RTLD_NOW $ac_have_decl
14523_ACEOF
14524ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14525"
14526if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14527 ac_have_decl=1
14528else
14529 ac_have_decl=0
14530fi
14531
14532cat >>confdefs.h <<_ACEOF
14533#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14534_ACEOF
14535ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14536"
14537if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14538 ac_have_decl=1
14539else
14540 ac_have_decl=0
14541fi
14542
14543cat >>confdefs.h <<_ACEOF
14544#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14545_ACEOF
14546ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14547"
14548if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14549 ac_have_decl=1
14550else
14551 ac_have_decl=0
14552fi
14553
14554cat >>confdefs.h <<_ACEOF
14555#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14556_ACEOF
14557ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14558"
14559if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14560 ac_have_decl=1
14561else
14562 ac_have_decl=0
14563fi
14564
14565cat >>confdefs.h <<_ACEOF
14566#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14567_ACEOF
14568ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14569"
14570if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14571 ac_have_decl=1
14572else
14573 ac_have_decl=0
14574fi
14575
14576cat >>confdefs.h <<_ACEOF
14577#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14578_ACEOF
14579
14580
Mark Dickinsonbd792642009-03-18 20:06:12 +000014581# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14583$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014584# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014585if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014586 enableval=$enable_big_digits; case $enable_big_digits in
14587yes)
14588 enable_big_digits=30 ;;
14589no)
14590 enable_big_digits=15 ;;
1459115|30)
14592 ;;
14593*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014594 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 +000014595esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14597$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014598
14599cat >>confdefs.h <<_ACEOF
14600#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14601_ACEOF
14602
14603
14604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14606$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014607fi
14608
14609
Guido van Rossumef2255b2000-03-10 22:30:29 +000014610# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014611ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014612if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014613
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014617 wchar_h="yes"
14618
Guido van Rossumef2255b2000-03-10 22:30:29 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014621
14622fi
14623
Michael W. Hudson54241132001-12-07 15:38:26 +000014624
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014626# determine wchar_t size
14627if test "$wchar_h" = yes
14628then
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14634$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014635if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014637else
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14639"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
Martin v. Löwis11437992002-04-12 09:54:03 +000014641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 if test "$ac_cv_type_wchar_t" = yes; then
14643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014645as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014646See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647 else
14648 ac_cv_sizeof_wchar_t=0
14649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014651
Martin v. Löwis11437992002-04-12 09:54:03 +000014652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14654$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655
14656
14657
Martin v. Löwis11437992002-04-12 09:54:03 +000014658cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014659#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014660_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014661
Michael W. Hudson54241132001-12-07 15:38:26 +000014662
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014663fi
14664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14666$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014667have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014669/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014670
14671#include <tcl.h>
14672#if TCL_UTF_MAX != 6
14673# error "NOT UCS4_TCL"
14674#endif
14675int
14676main ()
14677{
14678
14679 ;
14680 return 0;
14681}
14682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014684
14685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014687
14688 have_ucs4_tcl=yes
14689
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14693$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014694
Skip Montanaro6dead952003-09-25 14:50:04 +000014695# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014696if test "$wchar_h" = yes
14697then
14698 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14700$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014701 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014703else
14704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014706 ac_cv_wchar_t_signed=yes
14707else
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. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014710
14711 #include <wchar.h>
14712 int main()
14713 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014714 /* Success: exit code 0 */
14715 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014716 }
14717
14718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014719if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014720 ac_cv_wchar_t_signed=yes
14721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014726fi
14727
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014728fi
14729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14731$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732fi
14733
Georg Brandl52d168a2008-01-07 18:10:24 +000014734# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014735if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014736 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014737then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014738 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014741
Georg Brandl52d168a2008-01-07 18:10:24 +000014742else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014743 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014744fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14746$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014747
14748# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14750$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014751if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 ac_cv_c_bigendian=unknown
14755 # See if we're dealing with a universal compiler.
14756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14757/* end confdefs.h. */
14758#ifndef __APPLE_CC__
14759 not a universal capable compiler
14760 #endif
14761 typedef int dummy;
14762
Skip Montanaro6dead952003-09-25 14:50:04 +000014763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_compile "$LINENO"; then :
14765
14766 # Check for potential -arch flags. It is not universal unless
14767 # there are at least two -arch flags with different values.
14768 ac_arch=
14769 ac_prev=
14770 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14771 if test -n "$ac_prev"; then
14772 case $ac_word in
14773 i?86 | x86_64 | ppc | ppc64)
14774 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14775 ac_arch=$ac_word
14776 else
14777 ac_cv_c_bigendian=universal
14778 break
14779 fi
14780 ;;
14781 esac
14782 ac_prev=
14783 elif test "x$ac_word" = "x-arch"; then
14784 ac_prev=arch
14785 fi
14786 done
14787fi
14788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14789 if test $ac_cv_c_bigendian = unknown; then
14790 # See if sys/param.h defines the BYTE_ORDER macro.
14791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014792/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014793#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014795
Martin v. Löwis11437992002-04-12 09:54:03 +000014796int
14797main ()
14798{
Matthias Kloseb9621712010-04-24 17:59:49 +000014799#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14800 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14801 && LITTLE_ENDIAN)
14802 bogus endian macros
14803 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014804
14805 ;
14806 return 0;
14807}
14808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014809if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014810 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014812/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014813#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014815
Martin v. Löwis11437992002-04-12 09:54:03 +000014816int
14817main ()
14818{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014819#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 not big endian
14821 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014822
14823 ;
14824 return 0;
14825}
14826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014828 ac_cv_c_bigendian=yes
14829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014833fi
14834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835 fi
14836 if test $ac_cv_c_bigendian = unknown; then
14837 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014839/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014840#include <limits.h>
14841
Martin v. Löwis11437992002-04-12 09:54:03 +000014842int
14843main ()
14844{
Matthias Kloseb9621712010-04-24 17:59:49 +000014845#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14846 bogus endian macros
14847 #endif
14848
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_compile "$LINENO"; then :
14854 # It does; now see whether it defined to _BIG_ENDIAN or not.
14855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856/* end confdefs.h. */
14857#include <limits.h>
14858
14859int
14860main ()
14861{
14862#ifndef _BIG_ENDIAN
14863 not big endian
14864 #endif
14865
14866 ;
14867 return 0;
14868}
14869_ACEOF
14870if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014872else
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14876fi
14877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14878 fi
14879 if test $ac_cv_c_bigendian = unknown; then
14880 # Compile a test program.
14881 if test "$cross_compiling" = yes; then :
14882 # Try to guess by grepping values from an object file.
14883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14884/* end confdefs.h. */
14885short int ascii_mm[] =
14886 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14887 short int ascii_ii[] =
14888 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14889 int use_ascii (int i) {
14890 return ascii_mm[i] + ascii_ii[i];
14891 }
14892 short int ebcdic_ii[] =
14893 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14894 short int ebcdic_mm[] =
14895 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14896 int use_ebcdic (int i) {
14897 return ebcdic_mm[i] + ebcdic_ii[i];
14898 }
14899 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901int
14902main ()
14903{
14904return use_ascii (foo) == use_ebcdic (foo);
14905 ;
14906 return 0;
14907}
14908_ACEOF
14909if ac_fn_c_try_compile "$LINENO"; then :
14910 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14911 ac_cv_c_bigendian=yes
14912 fi
14913 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14914 if test "$ac_cv_c_bigendian" = unknown; then
14915 ac_cv_c_bigendian=no
14916 else
14917 # finding both strings is unlikely to happen, but who knows?
14918 ac_cv_c_bigendian=unknown
14919 fi
14920 fi
14921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014923else
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014925/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014927int
14928main ()
14929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 /* Are we little or big endian? From Harbison&Steele. */
14932 union
14933 {
14934 long int l;
14935 char c[sizeof (long int)];
14936 } u;
14937 u.l = 1;
14938 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939
14940 ;
14941 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014942}
Martin v. Löwis11437992002-04-12 09:54:03 +000014943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014944if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014945 ac_cv_c_bigendian=no
14946else
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14950 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14956$as_echo "$ac_cv_c_bigendian" >&6; }
14957 case $ac_cv_c_bigendian in #(
14958 yes)
14959 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14960;; #(
14961 no)
14962 ;; #(
14963 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014966
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 ;; #(
14968 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014969 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014970 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014972
Michael W. Hudson54241132001-12-07 15:38:26 +000014973
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014974# ABI version string for Python extension modules. This appears between the
14975# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14976# from the following attributes which affect the ABI of this Python build (in
14977# this order):
14978#
14979# * The Python implementation (always 'cpython-' for us)
14980# * The major and minor version numbers
14981# * --with-pydebug (adds a 'd')
14982# * --with-pymalloc (adds a 'm')
14983# * --with-wide-unicode (adds a 'u')
14984#
14985# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014986# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14987# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014988
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14990$as_echo_n "checking ABIFLAGS... " >&6; }
14991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14992$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14994$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014995SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14997$as_echo "$SOABI" >&6; }
14998
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014999
15000case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015001 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015002 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15003 *)
15004 EXT_SUFFIX=${SHLIB_SUFFIX};;
15005esac
15006
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15008$as_echo_n "checking LDVERSION... " >&6; }
15009LDVERSION='$(VERSION)$(ABIFLAGS)'
15010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15011$as_echo "$LDVERSION" >&6; }
15012
doko@python.org87421192013-01-26 11:39:31 +010015013
doko@ubuntu.com55532312016-06-14 08:55:19 +020015014if test x$PLATFORM_TRIPLET = x; then
15015 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15016else
15017 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15018fi
doko@python.org87421192013-01-26 11:39:31 +010015019
15020
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015021# Check whether right shifting a negative integer extends the sign bit
15022# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15024$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015025if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028
Matthias Kloseb9621712010-04-24 17:59:49 +000015029if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015030 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015031else
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015034
15035int main()
15036{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015037 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015038}
15039
Martin v. Löwis11437992002-04-12 09:54:03 +000015040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015041if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015042 ac_cv_rshift_extends_sign=yes
15043else
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015048fi
15049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050fi
15051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15053$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015054if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015055then
Martin v. Löwis11437992002-04-12 09:54:03 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015058
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015059fi
15060
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015061# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15063$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015064if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015066else
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015069/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015070#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015071int
15072main ()
15073{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015074
15075 FILE *f = fopen("/dev/null", "r");
15076 flockfile(f);
15077 getc_unlocked(f);
15078 funlockfile(f);
15079
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ;
15081 return 0;
15082}
15083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015084if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015085 ac_cv_have_getc_unlocked=yes
15086else
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 ac_cv_have_getc_unlocked=no
15088fi
15089rm -f core conftest.err conftest.$ac_objext \
15090 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15094$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015095if test "$ac_cv_have_getc_unlocked" = yes
15096then
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015099
15100fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015101
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015102# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015103# save the value of LIBS so we don't actually link Python with readline
15104LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015105
Gregory P. Smith18820942008-09-07 06:24:49 +000015106# On some systems we need to link readline to a termcap compatible
15107# library. NOTE: Keep the precedence of listed libraries synchronised
15108# with setup.py.
15109py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15111$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015112for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015113 if test -z "$py_libtermcap"; then
15114 READLINE_LIBS="-lreadline"
15115 else
15116 READLINE_LIBS="-lreadline -l$py_libtermcap"
15117 fi
15118 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015120/* end confdefs.h. */
15121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122/* Override any GCC internal prototype to avoid an error.
15123 Use char because int might match the return type of a GCC
15124 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015125#ifdef __cplusplus
15126extern "C"
15127#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015128char readline ();
15129int
15130main ()
15131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015133 ;
15134 return 0;
15135}
15136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015137if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015138 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015140rm -f core conftest.err conftest.$ac_objext \
15141 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015142 if test $py_cv_lib_readline = yes; then
15143 break
15144 fi
15145done
15146# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15147#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015148if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15150$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015151else
Matthias Kloseb9621712010-04-24 17:59:49 +000015152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15153$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015156
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015157fi
15158
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015159# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15161$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015162if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164else
15165 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015166LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015168/* end confdefs.h. */
15169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170/* Override any GCC internal prototype to avoid an error.
15171 Use char because int might match the return type of a GCC
15172 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015173#ifdef __cplusplus
15174extern "C"
15175#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176char rl_callback_handler_install ();
15177int
15178main ()
15179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181 ;
15182 return 0;
15183}
15184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015185if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186 ac_cv_lib_readline_rl_callback_handler_install=yes
15187else
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190rm -f core conftest.err conftest.$ac_objext \
15191 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015192LIBS=$ac_check_lib_save_LIBS
15193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15195$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015196if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199
15200fi
15201
15202
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015203# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015205/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015206#include <readline/readline.h>
15207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015208if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015209 have_readline=yes
15210else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015211 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015212
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015213fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015214rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015215if test $have_readline = yes
15216then
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015218/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015219#include <readline/readline.h>
15220
15221_ACEOF
15222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015226
15227fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015228rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015231/* end confdefs.h. */
15232#include <readline/readline.h>
15233
15234_ACEOF
15235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015237
Matthias Kloseb9621712010-04-24 17:59:49 +000015238$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015239
15240fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015241rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015242
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015243fi
15244
Martin v. Löwis0daad592001-09-30 21:09:59 +000015245# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15247$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015248if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015250else
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015252LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256/* Override any GCC internal prototype to avoid an error.
15257 Use char because int might match the return type of a GCC
15258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015259#ifdef __cplusplus
15260extern "C"
15261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015262char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015263int
15264main ()
15265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ;
15268 return 0;
15269}
15270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015271if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015273else
Matthias Kloseb9621712010-04-24 17:59:49 +000015274 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015276rm -f core conftest.err conftest.$ac_objext \
15277 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015278LIBS=$ac_check_lib_save_LIBS
15279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15281$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015282if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015285
Martin v. Löwis0daad592001-09-30 21:09:59 +000015286fi
15287
Michael W. Hudson54241132001-12-07 15:38:26 +000015288
Thomas Wouters89d996e2007-09-08 17:39:28 +000015289# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15291$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015292if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015294else
15295 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015296LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015298/* end confdefs.h. */
15299
15300/* Override any GCC internal prototype to avoid an error.
15301 Use char because int might match the return type of a GCC
15302 builtin and then its argument prototype would still apply. */
15303#ifdef __cplusplus
15304extern "C"
15305#endif
15306char rl_completion_display_matches_hook ();
15307int
15308main ()
15309{
15310return rl_completion_display_matches_hook ();
15311 ;
15312 return 0;
15313}
15314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015315if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015316 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15317else
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015320rm -f core conftest.err conftest.$ac_objext \
15321 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015322LIBS=$ac_check_lib_save_LIBS
15323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15325$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015326if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015329
15330fi
15331
15332
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015333# also in 4.0, but not in editline
15334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15335$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15336if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15337 $as_echo_n "(cached) " >&6
15338else
15339 ac_check_lib_save_LIBS=$LIBS
15340LIBS="-lreadline $READLINE_LIBS $LIBS"
15341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15342/* end confdefs.h. */
15343
15344/* Override any GCC internal prototype to avoid an error.
15345 Use char because int might match the return type of a GCC
15346 builtin and then its argument prototype would still apply. */
15347#ifdef __cplusplus
15348extern "C"
15349#endif
15350char rl_resize_terminal ();
15351int
15352main ()
15353{
15354return rl_resize_terminal ();
15355 ;
15356 return 0;
15357}
15358_ACEOF
15359if ac_fn_c_try_link "$LINENO"; then :
15360 ac_cv_lib_readline_rl_resize_terminal=yes
15361else
15362 ac_cv_lib_readline_rl_resize_terminal=no
15363fi
15364rm -f core conftest.err conftest.$ac_objext \
15365 conftest$ac_exeext conftest.$ac_ext
15366LIBS=$ac_check_lib_save_LIBS
15367fi
15368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15369$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15370if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15371
15372$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15373
15374fi
15375
15376
Martin v. Löwis0daad592001-09-30 21:09:59 +000015377# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15379$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015380if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015382else
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015384LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388/* Override any GCC internal prototype to avoid an error.
15389 Use char because int might match the return type of a GCC
15390 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015391#ifdef __cplusplus
15392extern "C"
15393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015394char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015395int
15396main ()
15397{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ;
15400 return 0;
15401}
15402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015403if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015405else
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015408rm -f core conftest.err conftest.$ac_objext \
15409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015410LIBS=$ac_check_lib_save_LIBS
15411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15413$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015414if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015415
Matthias Kloseb9621712010-04-24 17:59:49 +000015416$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015417
Guido van Rossum353ae582001-07-10 16:45:32 +000015418fi
15419
Jack Jansendd19cf82001-12-06 22:36:17 +000015420
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015421# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015423/* end confdefs.h. */
15424#include <readline/readline.h>
15425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015426if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015427 have_readline=yes
15428else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015429 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015430
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015431fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015432rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015433if test $have_readline = yes
15434then
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015436/* end confdefs.h. */
15437#include <readline/readline.h>
15438
15439_ACEOF
15440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015444
15445fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015446rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015447
15448fi
15449
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15451$as_echo_n "checking for append_history in -lreadline... " >&6; }
15452if ${ac_cv_lib_readline_append_history+:} false; then :
15453 $as_echo_n "(cached) " >&6
15454else
15455 ac_check_lib_save_LIBS=$LIBS
15456LIBS="-lreadline $READLINE_LIBS $LIBS"
15457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15458/* end confdefs.h. */
15459
15460/* Override any GCC internal prototype to avoid an error.
15461 Use char because int might match the return type of a GCC
15462 builtin and then its argument prototype would still apply. */
15463#ifdef __cplusplus
15464extern "C"
15465#endif
15466char append_history ();
15467int
15468main ()
15469{
15470return append_history ();
15471 ;
15472 return 0;
15473}
15474_ACEOF
15475if ac_fn_c_try_link "$LINENO"; then :
15476 ac_cv_lib_readline_append_history=yes
15477else
15478 ac_cv_lib_readline_append_history=no
15479fi
15480rm -f core conftest.err conftest.$ac_objext \
15481 conftest$ac_exeext conftest.$ac_ext
15482LIBS=$ac_check_lib_save_LIBS
15483fi
15484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15485$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15486if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15487
15488$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15489
15490fi
15491
15492
Martin v. Löwis82bca632006-02-10 20:49:30 +000015493# End of readline checks: restore LIBS
15494LIBS=$LIBS_no_readline
15495
Matthias Kloseb9621712010-04-24 17:59:49 +000015496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15497$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015498if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015500else
Martin v. Löwis11437992002-04-12 09:54:03 +000015501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015503 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015506/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015507
15508int main()
15509{
15510 int val1 = nice(1);
15511 if (val1 != -1 && val1 == nice(2))
15512 exit(0);
15513 exit(1);
15514}
15515
Martin v. Löwis11437992002-04-12 09:54:03 +000015516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015518 ac_cv_broken_nice=yes
15519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15523 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015524fi
15525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526fi
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15529$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015530if test "$ac_cv_broken_nice" = yes
15531then
Martin v. Löwis11437992002-04-12 09:54:03 +000015532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015534
15535fi
15536
Matthias Kloseb9621712010-04-24 17:59:49 +000015537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15538$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015539if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015543 ac_cv_broken_poll=no
15544else
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015546/* end confdefs.h. */
15547
15548#include <poll.h>
15549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015550int main()
15551{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015552 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015553 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015554
15555 close (42);
15556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015557 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015558 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015559 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015560 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015561 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015562 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015563 return 1;
15564}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015565
15566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015567if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015568 ac_cv_broken_poll=yes
15569else
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15573 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015576fi
15577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15579$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015580if test "$ac_cv_broken_poll" = yes
15581then
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015584
15585fi
15586
Brett Cannon43802422005-02-10 20:48:03 +000015587# 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 +000015588# (which is not required by ISO C or UNIX spec) and/or if we support
15589# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015590ac_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 +000015591#include <$ac_cv_struct_tm>
15592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593"
Victor Stinnere0be4232011-10-25 13:06:09 +020015594if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015595
15596cat >>confdefs.h <<_ACEOF
15597#define HAVE_STRUCT_TM_TM_ZONE 1
15598_ACEOF
15599
15600
15601fi
15602
15603if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015606
15607else
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15609"
Victor Stinnere0be4232011-10-25 13:06:09 +020015610if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015611 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612else
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614fi
15615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015616cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015617#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618_ACEOF
15619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15621$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015622if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015626/* end confdefs.h. */
15627#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015628#if !HAVE_DECL_TZNAME
15629extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015630#endif
15631
15632int
15633main ()
15634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015636 ;
15637 return 0;
15638}
15639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015640if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015641 ac_cv_var_tzname=yes
15642else
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015645rm -f core conftest.err conftest.$ac_objext \
15646 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15649$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015650 if test $ac_cv_var_tzname = yes; then
15651
Matthias Kloseb9621712010-04-24 17:59:49 +000015652$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015653
15654 fi
15655fi
15656
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015657
Martin v. Löwis1d459062005-03-14 21:23:33 +000015658# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15660$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015661if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015663else
15664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015666 ac_cv_working_tzset=no
15667else
Matthias Kloseb9621712010-04-24 17:59:49 +000015668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015669/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015670
15671#include <stdlib.h>
15672#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015673#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015674
15675#if HAVE_TZNAME
15676extern char *tzname[];
15677#endif
15678
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015679int main()
15680{
Brett Cannon18367812003-09-19 00:59:16 +000015681 /* Note that we need to ensure that not only does tzset(3)
15682 do 'something' with localtime, but it works as documented
15683 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015684 This includes making sure that tzname is set properly if
15685 tm->tm_zone does not exist since it is the alternative way
15686 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015687
15688 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015689 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015690 */
15691
Martin v. Löwis1d459062005-03-14 21:23:33 +000015692 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015693 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15694
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015695 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015696 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015697 if (localtime(&groundhogday)->tm_hour != 0)
15698 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015699#if HAVE_TZNAME
15700 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15701 if (strcmp(tzname[0], "UTC") ||
15702 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15703 exit(1);
15704#endif
Brett Cannon18367812003-09-19 00:59:16 +000015705
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015706 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015707 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015708 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015709 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015710#if HAVE_TZNAME
15711 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15712 exit(1);
15713#endif
Brett Cannon18367812003-09-19 00:59:16 +000015714
15715 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15716 tzset();
15717 if (localtime(&groundhogday)->tm_hour != 11)
15718 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015719#if HAVE_TZNAME
15720 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15721 exit(1);
15722#endif
15723
15724#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015725 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15726 exit(1);
15727 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15728 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015729#endif
Brett Cannon18367812003-09-19 00:59:16 +000015730
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015731 exit(0);
15732}
15733
15734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015735if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015736 ac_cv_working_tzset=yes
15737else
Matthias Kloseb9621712010-04-24 17:59:49 +000015738 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015742fi
15743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744fi
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15747$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015748if test "$ac_cv_working_tzset" = yes
15749then
15750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015752
15753fi
15754
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015755# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15757$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015758if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015762/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015763#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015764int
15765main ()
15766{
15767
15768struct stat st;
15769st.st_mtim.tv_nsec = 1;
15770
15771 ;
15772 return 0;
15773}
15774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015776 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015777else
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15781fi
15782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15784$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015785if test "$ac_cv_stat_tv_nsec" = yes
15786then
15787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015789
15790fi
15791
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015792# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15794$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015795if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015797else
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015799/* end confdefs.h. */
15800#include <sys/stat.h>
15801int
15802main ()
15803{
15804
15805struct stat st;
15806st.st_mtimespec.tv_nsec = 1;
15807
15808 ;
15809 return 0;
15810}
15811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015813 ac_cv_stat_tv_nsec2=yes
15814else
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15818fi
15819
Matthias Kloseb9621712010-04-24 17:59:49 +000015820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15821$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015822if test "$ac_cv_stat_tv_nsec2" = yes
15823then
15824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015826
15827fi
15828
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015829# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015830ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015831if test "$cross_compiling" = no; then
15832 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15833fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015834
15835for ac_header in curses.h ncurses.h
15836do :
15837 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15838ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15839if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15840 cat >>confdefs.h <<_ACEOF
15841#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15842_ACEOF
15843
15844fi
15845
15846done
15847
15848
15849# On Solaris, term.h requires curses.h
15850for ac_header in term.h
15851do :
15852 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15853#ifdef HAVE_CURSES_H
15854#include <curses.h>
15855#endif
15856
15857"
15858if test "x$ac_cv_header_term_h" = xyes; then :
15859 cat >>confdefs.h <<_ACEOF
15860#define HAVE_TERM_H 1
15861_ACEOF
15862
15863fi
15864
15865done
15866
15867
Jack Jansen666b1e72001-10-31 12:11:48 +000015868# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15870$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015871if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015873else
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015875/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015876#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015877int
15878main ()
15879{
Jack Jansen666b1e72001-10-31 12:11:48 +000015880
15881 int rtn;
15882 rtn = mvwdelch(0,0,0);
15883
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 ;
15885 return 0;
15886}
15887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015888if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015889 ac_cv_mvwdelch_is_expression=yes
15890else
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15894fi
15895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15897$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015898
15899if test "$ac_cv_mvwdelch_is_expression" = yes
15900then
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
Matthias Kloseb9621712010-04-24 17:59:49 +000015902$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015903
15904fi
15905
Matthias Kloseb9621712010-04-24 17:59:49 +000015906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15907$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015908if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015910else
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015912/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015913#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015914int
15915main ()
15916{
Jack Jansen666b1e72001-10-31 12:11:48 +000015917
15918 WINDOW *w;
15919 w->_flags = 0;
15920
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 ;
15922 return 0;
15923}
15924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015925if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015926 ac_cv_window_has_flags=yes
15927else
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15931fi
15932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15934$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015935
Jack Jansen666b1e72001-10-31 12:11:48 +000015936
15937if test "$ac_cv_window_has_flags" = yes
15938then
Martin v. Löwis11437992002-04-12 09:54:03 +000015939
Matthias Kloseb9621712010-04-24 17:59:49 +000015940$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015941
15942fi
15943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15945$as_echo_n "checking for is_term_resized... " >&6; }
15946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015947/* end confdefs.h. */
15948#include <curses.h>
15949int
15950main ()
15951{
15952void *x=is_term_resized
15953 ;
15954 return 0;
15955}
15956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015958
Matthias Kloseb9621712010-04-24 17:59:49 +000015959$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015960
Matthias Kloseb159a552010-04-25 21:00:44 +000015961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015962$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015963else
Matthias Kloseb9621712010-04-24 17:59:49 +000015964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15965$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015966
15967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15971$as_echo_n "checking for resize_term... " >&6; }
15972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015973/* end confdefs.h. */
15974#include <curses.h>
15975int
15976main ()
15977{
15978void *x=resize_term
15979 ;
15980 return 0;
15981}
15982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015983if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015984
Matthias Kloseb9621712010-04-24 17:59:49 +000015985$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015986
Matthias Kloseb159a552010-04-25 21:00:44 +000015987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015988$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015989else
Matthias Kloseb9621712010-04-24 17:59:49 +000015990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15991$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015992
15993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15995
Matthias Kloseb9621712010-04-24 17:59:49 +000015996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15997$as_echo_n "checking for resizeterm... " >&6; }
15998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015999/* end confdefs.h. */
16000#include <curses.h>
16001int
16002main ()
16003{
16004void *x=resizeterm
16005 ;
16006 return 0;
16007}
16008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016009if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016012
Matthias Kloseb159a552010-04-25 21:00:44 +000016013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016015else
Matthias Kloseb9621712010-04-24 17:59:49 +000016016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16017$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016018
16019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016021# last curses configure check
16022CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16025$as_echo "$as_me: checking for device files" >&6;}
16026
16027if test "x$cross_compiling" = xyes; then
16028 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16030$as_echo_n "checking for /dev/ptmx... " >&6; }
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16032$as_echo "not set" >&6; }
16033 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16034 fi
16035 if test "${ac_cv_file__dev_ptc+set}" != set; then
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16037$as_echo_n "checking for /dev/ptc... " >&6; }
16038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16039$as_echo "not set" >&6; }
16040 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16041 fi
16042fi
16043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16045$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016046if ${ac_cv_file__dev_ptmx+:} false; then :
16047 $as_echo_n "(cached) " >&6
16048else
16049 test "$cross_compiling" = yes &&
16050 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16051if test -r "/dev/ptmx"; then
16052 ac_cv_file__dev_ptmx=yes
16053else
16054 ac_cv_file__dev_ptmx=no
16055fi
16056fi
16057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16058$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16059if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016060
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016061fi
16062
16063if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016066
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16069$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016070if ${ac_cv_file__dev_ptc+:} false; then :
16071 $as_echo_n "(cached) " >&6
16072else
16073 test "$cross_compiling" = yes &&
16074 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16075if test -r "/dev/ptc"; then
16076 ac_cv_file__dev_ptc=yes
16077else
16078 ac_cv_file__dev_ptc=no
16079fi
16080fi
16081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16082$as_echo "$ac_cv_file__dev_ptc" >&6; }
16083if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016084
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016085fi
16086
16087if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016090
Neal Norwitz865400f2003-03-21 01:42:58 +000016091fi
16092
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016093if test $ac_sys_system = Darwin
16094then
16095 LIBS="$LIBS -framework CoreFoundation"
16096fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16099$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016100if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016101 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016102else
Matthias Kloseb9621712010-04-24 17:59:49 +000016103 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016104 ac_cv_have_size_t_format="cross -- assuming yes"
16105
Thomas Wouters477c8d52006-05-27 19:21:47 +000016106else
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016108/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016109
Thomas Wouters477c8d52006-05-27 19:21:47 +000016110#include <stdio.h>
16111#include <stddef.h>
16112#include <string.h>
16113
Christian Heimes2c181612007-12-17 20:04:13 +000016114#ifdef HAVE_SYS_TYPES_H
16115#include <sys/types.h>
16116#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016117
16118#ifdef HAVE_SSIZE_T
16119typedef ssize_t Py_ssize_t;
16120#elif SIZEOF_VOID_P == SIZEOF_LONG
16121typedef long Py_ssize_t;
16122#else
16123typedef int Py_ssize_t;
16124#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016125
Christian Heimes2c181612007-12-17 20:04:13 +000016126int main()
16127{
16128 char buffer[256];
16129
Thomas Wouters477c8d52006-05-27 19:21:47 +000016130 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16131 return 1;
16132
Thomas Wouters89f507f2006-12-13 04:49:30 +000016133 if (strcmp(buffer, "123"))
16134 return 1;
16135
16136 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16137 return 1;
16138
16139 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016140 return 1;
16141
16142 return 0;
16143}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016144
Thomas Wouters477c8d52006-05-27 19:21:47 +000016145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016146if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016147 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016148else
Matthias Kloseb9621712010-04-24 17:59:49 +000016149 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016153fi
16154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16157$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016158if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016159
Matthias Kloseb9621712010-04-24 17:59:49 +000016160$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016161
16162fi
16163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016165#ifdef HAVE_SYS_TYPES_H
16166#include <sys/types.h>
16167#endif
16168#ifdef HAVE_SYS_SOCKET_H
16169#include <sys/socket.h>
16170#endif
16171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172"
Victor Stinnere0be4232011-10-25 13:06:09 +020016173if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016174
Martin v. Löwis11437992002-04-12 09:54:03 +000016175else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016176
Matthias Kloseb9621712010-04-24 17:59:49 +000016177$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016178
16179fi
16180
Michael W. Hudson54241132001-12-07 15:38:26 +000016181
Matthias Kloseb9621712010-04-24 17:59:49 +000016182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16183$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016184if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016186else
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016188 ac_cv_broken_mbstowcs=no
16189else
Matthias Kloseb9621712010-04-24 17:59:49 +000016190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016191/* end confdefs.h. */
16192
Stefan Krah19c21392012-11-22 23:47:32 +010016193#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016194#include<stdlib.h>
16195int main() {
16196 size_t len = -1;
16197 const char *str = "text";
16198 len = mbstowcs(NULL, str, 0);
16199 return (len != 4);
16200}
16201
16202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016203if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016204 ac_cv_broken_mbstowcs=no
16205else
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16209 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016210fi
16211
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016212fi
16213
Matthias Kloseb9621712010-04-24 17:59:49 +000016214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16215$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016216if test "$ac_cv_broken_mbstowcs" = yes
16217then
16218
Matthias Kloseb9621712010-04-24 17:59:49 +000016219$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016220
16221fi
16222
Antoine Pitroub52ec782009-01-25 16:34:23 +000016223# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16225$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016226
16227# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016228if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016229 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016230if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016231then
16232
Matthias Kloseb9621712010-04-24 17:59:49 +000016233$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016234
Matthias Kloseb9621712010-04-24 17:59:49 +000016235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16236$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016237fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016238if test "$withval" = no
16239then
16240
16241$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16242
Matthias Kloseb9621712010-04-24 17:59:49 +000016243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16244$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016245fi
16246
Antoine Pitrou042b1282010-08-13 21:15:58 +000016247else
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16249$as_echo "no value specified" >&6; }
16250fi
16251
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252
Matthias Kloseb17289e2012-03-15 19:51:34 +010016253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16254$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16255if ${ac_cv_computed_gotos+:} false; then :
16256 $as_echo_n "(cached) " >&6
16257else
16258 if test "$cross_compiling" = yes; then :
16259 if test "${with_computed_gotos+set}" = set; then
16260 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16261 else
16262 ac_cv_computed_gotos=no
16263 fi
16264else
16265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16266/* end confdefs.h. */
16267
16268int main(int argc, char **argv)
16269{
16270 static void *targets[1] = { &&LABEL1 };
16271 goto LABEL2;
16272LABEL1:
16273 return 0;
16274LABEL2:
16275 goto *targets[0];
16276 return 1;
16277}
16278
16279_ACEOF
16280if ac_fn_c_try_run "$LINENO"; then :
16281 ac_cv_computed_gotos=yes
16282else
16283 ac_cv_computed_gotos=no
16284fi
16285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16286 conftest.$ac_objext conftest.beam conftest.$ac_ext
16287fi
16288
16289fi
16290
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16292$as_echo "$ac_cv_computed_gotos" >&6; }
16293case "$ac_cv_computed_gotos" in yes*)
16294
16295$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16296
16297esac
16298
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016299case $ac_sys_system in
16300AIX*)
16301
16302$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16303 ;;
16304esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016305
Michael W. Hudson54241132001-12-07 15:38:26 +000016306
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016307
16308
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016309for h in `(cd $srcdir;echo Python/thread_*.h)`
16310do
16311 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16312done
16313
Michael W. Hudson54241132001-12-07 15:38:26 +000016314
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016315SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16317$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016318for dir in $SRCDIRS; do
16319 if test ! -d $dir; then
16320 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016321 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016322done
Matthias Kloseb9621712010-04-24 17:59:49 +000016323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16324$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016325
Stefan Krah1919b7e2012-03-21 18:25:23 +010016326# Availability of -O2:
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16328$as_echo_n "checking for -O2... " >&6; }
16329saved_cflags="$CFLAGS"
16330CFLAGS="-O2"
16331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332/* end confdefs.h. */
16333
16334int
16335main ()
16336{
16337
16338
16339 ;
16340 return 0;
16341}
16342_ACEOF
16343if ac_fn_c_try_compile "$LINENO"; then :
16344 have_O2=yes
16345else
16346 have_O2=no
16347fi
16348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16350$as_echo "$have_O2" >&6; }
16351CFLAGS="$saved_cflags"
16352
16353# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16354# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16356$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16357saved_cflags="$CFLAGS"
16358CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16359if test "$have_O2" = no; then
16360 CFLAGS=""
16361fi
16362if test "$cross_compiling" = yes; then :
16363 have_glibc_memmove_bug=undefined
16364else
16365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366/* end confdefs.h. */
16367
16368#include <stdio.h>
16369#include <stdlib.h>
16370#include <string.h>
16371void foo(void *p, void *q) { memmove(p, q, 19); }
16372int main() {
16373 char a[32] = "123456789000000000";
16374 foo(&a[9], a);
16375 if (strcmp(a, "123456789123456789000000000") != 0)
16376 return 1;
16377 foo(a, &a[9]);
16378 if (strcmp(a, "123456789000000000") != 0)
16379 return 1;
16380 return 0;
16381}
16382
16383_ACEOF
16384if ac_fn_c_try_run "$LINENO"; then :
16385 have_glibc_memmove_bug=no
16386else
16387 have_glibc_memmove_bug=yes
16388fi
16389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16390 conftest.$ac_objext conftest.beam conftest.$ac_ext
16391fi
16392
16393CFLAGS="$saved_cflags"
16394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16395$as_echo "$have_glibc_memmove_bug" >&6; }
16396if test "$have_glibc_memmove_bug" = yes; then
16397
16398$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16399
16400fi
16401
16402if test "$have_gcc_asm_for_x87" = yes; then
16403 # Some versions of gcc miscompile inline asm:
16404 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16405 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16406 case $CC in
16407 *gcc*)
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16409$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16410 saved_cflags="$CFLAGS"
16411 CFLAGS="-O2"
16412 if test "$cross_compiling" = yes; then :
16413 have_ipa_pure_const_bug=undefined
16414else
16415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416/* end confdefs.h. */
16417
16418 __attribute__((noinline)) int
16419 foo(int *p) {
16420 int r;
16421 asm ( "movl \$6, (%1)\n\t"
16422 "xorl %0, %0\n\t"
16423 : "=r" (r) : "r" (p) : "memory"
16424 );
16425 return r;
16426 }
16427 int main() {
16428 int p = 8;
16429 if ((foo(&p) ? : p) != 6)
16430 return 1;
16431 return 0;
16432 }
16433
16434_ACEOF
16435if ac_fn_c_try_run "$LINENO"; then :
16436 have_ipa_pure_const_bug=no
16437else
16438 have_ipa_pure_const_bug=yes
16439fi
16440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16441 conftest.$ac_objext conftest.beam conftest.$ac_ext
16442fi
16443
16444 CFLAGS="$saved_cflags"
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16446$as_echo "$have_ipa_pure_const_bug" >&6; }
16447 if test "$have_ipa_pure_const_bug" = yes; then
16448
16449$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16450
16451 fi
16452 ;;
16453 esac
16454fi
16455
Victor Stinner4f5366e2015-01-09 02:13:19 +010016456# Check for stdatomic.h
16457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16458$as_echo_n "checking for stdatomic.h... " >&6; }
16459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16460/* end confdefs.h. */
16461
16462
16463 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016464 atomic_int value = ATOMIC_VAR_INIT(1);
16465 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016466 int main() {
16467 int loaded_value = atomic_load(&value);
16468 return 0;
16469 }
16470
16471
16472_ACEOF
16473if ac_fn_c_try_link "$LINENO"; then :
16474 have_stdatomic_h=yes
16475else
16476 have_stdatomic_h=no
16477fi
16478rm -f core conftest.err conftest.$ac_objext \
16479 conftest$ac_exeext conftest.$ac_ext
16480
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16482$as_echo "$have_stdatomic_h" >&6; }
16483
16484if test "$have_stdatomic_h" = yes; then
16485
16486$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16487
16488fi
16489
16490# Check for GCC >= 4.7 __atomic builtins
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16492$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494/* end confdefs.h. */
16495
16496
16497 volatile int val = 1;
16498 int main() {
16499 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16500 return 0;
16501 }
16502
16503
16504_ACEOF
16505if ac_fn_c_try_link "$LINENO"; then :
16506 have_builtin_atomic=yes
16507else
16508 have_builtin_atomic=no
16509fi
16510rm -f core conftest.err conftest.$ac_objext \
16511 conftest$ac_exeext conftest.$ac_ext
16512
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16514$as_echo "$have_builtin_atomic" >&6; }
16515
16516if test "$have_builtin_atomic" = yes; then
16517
16518$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16519
16520fi
16521
Ned Deily322f5ba2013-11-21 23:01:59 -080016522# ensurepip option
16523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16524$as_echo_n "checking for ensurepip... " >&6; }
16525
16526# Check whether --with-ensurepip was given.
16527if test "${with_ensurepip+set}" = set; then :
16528 withval=$with_ensurepip;
16529else
16530 with_ensurepip=upgrade
16531fi
16532
16533case $with_ensurepip in #(
16534 yes|upgrade) :
16535 ENSUREPIP=upgrade ;; #(
16536 install) :
16537 ENSUREPIP=install ;; #(
16538 no) :
16539 ENSUREPIP=no ;; #(
16540 *) :
16541 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16542esac
16543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16544$as_echo "$ENSUREPIP" >&6; }
16545
16546
Victor Stinner35a97c02015-03-08 02:59:09 +010016547# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16549$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16551/* end confdefs.h. */
16552
16553
16554 #include <dirent.h>
16555
16556 int main() {
16557 struct dirent entry;
16558 return entry.d_type == DT_UNKNOWN;
16559 }
16560
16561
16562_ACEOF
16563if ac_fn_c_try_link "$LINENO"; then :
16564 have_dirent_d_type=yes
16565else
16566 have_dirent_d_type=no
16567fi
16568rm -f core conftest.err conftest.$ac_objext \
16569 conftest$ac_exeext conftest.$ac_ext
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16571$as_echo "$have_dirent_d_type" >&6; }
16572
16573if test "$have_dirent_d_type" = yes; then
16574
16575$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16576
16577fi
16578
Victor Stinner9eb57c52015-03-19 22:21:49 +010016579# check if the Linux getrandom() syscall is available
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16581$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h. */
16584
16585
Victor Stinner1b80b242016-04-12 22:34:58 +020016586 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016587 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016588 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016589
16590 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016591 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016592 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016593 const int flags = GRND_NONBLOCK;
16594 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016595 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016596 return 0;
16597 }
16598
16599
16600_ACEOF
16601if ac_fn_c_try_link "$LINENO"; then :
16602 have_getrandom_syscall=yes
16603else
16604 have_getrandom_syscall=no
16605fi
16606rm -f core conftest.err conftest.$ac_objext \
16607 conftest$ac_exeext conftest.$ac_ext
16608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16609$as_echo "$have_getrandom_syscall" >&6; }
16610
16611if test "$have_getrandom_syscall" = yes; then
16612
16613$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16614
16615fi
16616
Victor Stinner3abf44e2015-09-18 15:38:37 +020016617# check if the getrandom() function is available
16618# the test was written for the Solaris function of <sys/random.h>
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16620$as_echo_n "checking for the getrandom() function... " >&6; }
16621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622/* end confdefs.h. */
16623
16624
16625 #include <sys/random.h>
16626
16627 int main() {
16628 char buffer[1];
16629 const size_t buflen = sizeof(buffer);
16630 const int flags = 0;
16631 /* ignore the result, Python checks for ENOSYS at runtime */
16632 (void)getrandom(buffer, buflen, flags);
16633 return 0;
16634 }
16635
16636
16637_ACEOF
16638if ac_fn_c_try_link "$LINENO"; then :
16639 have_getrandom=yes
16640else
16641 have_getrandom=no
16642fi
16643rm -f core conftest.err conftest.$ac_objext \
16644 conftest$ac_exeext conftest.$ac_ext
16645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16646$as_echo "$have_getrandom" >&6; }
16647
16648if test "$have_getrandom" = yes; then
16649
16650$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16651
16652fi
16653
Guido van Rossum627b2d71993-12-24 10:39:16 +000016654# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016655ac_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 +000016656
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016657ac_config_files="$ac_config_files Modules/ld_so_aix"
16658
Martin v. Löwis11437992002-04-12 09:54:03 +000016659cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016660# This file is a shell script that caches the results of configure
16661# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016662# scripts and configure runs, see configure's option --config-cache.
16663# It is not useful on other systems. If it contains results you don't
16664# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016665#
Martin v. Löwis11437992002-04-12 09:54:03 +000016666# config.status only pays attention to the cache file if you give it
16667# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016668#
Skip Montanaro6dead952003-09-25 14:50:04 +000016669# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016670# loading this file, other *unset* `ac_cv_foo' will be assigned the
16671# following values.
16672
16673_ACEOF
16674
Guido van Rossumf78abae1997-01-21 22:02:36 +000016675# The following way of writing the cache mishandles newlines in values,
16676# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016678# Ultrix sh set writes to stderr and can't be redirected directly,
16679# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680(
16681 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16682 eval ac_val=\$$ac_var
16683 case $ac_val in #(
16684 *${as_nl}*)
16685 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016686 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16687$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688 esac
16689 case $ac_var in #(
16690 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16692 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 esac ;;
16694 esac
16695 done
16696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16699 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016700 # `set' does not quote correctly, so add quotes: double-quote
16701 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016703 "s/'/'\\\\''/g;
16704 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 *)
16707 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 esac |
16711 sort
16712) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16718 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16720 :end' >>confcache
16721if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16722 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016723 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16725$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016726 if test ! -f "$cache_file" || test -h "$cache_file"; then
16727 cat confcache >"$cache_file"
16728 else
16729 case $cache_file in #(
16730 */* | ?:*)
16731 mv -f confcache "$cache_file"$$ &&
16732 mv -f "$cache_file"$$ "$cache_file" ;; #(
16733 *)
16734 mv -f confcache "$cache_file" ;;
16735 esac
16736 fi
16737 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016738 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16740$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016741 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016742fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016743rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016745test "x$prefix" = xNONE && prefix=$ac_default_prefix
16746# Let make expand exec_prefix.
16747test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016749DEFS=-DHAVE_CONFIG_H
16750
Skip Montanaro6dead952003-09-25 14:50:04 +000016751ac_libobjs=
16752ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016753U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016754for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16755 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016757 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016758 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16759 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016760 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16761 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016762done
16763LIBOBJS=$ac_libobjs
16764
16765LTLIBOBJS=$ac_ltlibobjs
16766
16767
Martin v. Löwis11437992002-04-12 09:54:03 +000016768
Matthias Kloseb9621712010-04-24 17:59:49 +000016769
Victor Stinnere0be4232011-10-25 13:06:09 +020016770: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016771ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016772ac_clean_files_save=$ac_clean_files
16773ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016774{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16775$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16776as_write_fail=0
16777cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016778#! $SHELL
16779# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016780# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016781# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016782# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016783
Martin v. Löwis11437992002-04-12 09:54:03 +000016784debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016785ac_cs_recheck=false
16786ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016787
Matthias Kloseb9621712010-04-24 17:59:49 +000016788SHELL=\${CONFIG_SHELL-$SHELL}
16789export SHELL
16790_ASEOF
16791cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16792## -------------------- ##
16793## M4sh Initialization. ##
16794## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796# Be more Bourne compatible
16797DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016798if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 emulate sh
16800 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016802 # is contrary to our usage. Disable this feature.
16803 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016805else
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 case `(set -o) 2>/dev/null` in #(
16807 *posix*) :
16808 set -o posix ;; #(
16809 *) :
16810 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016812fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016813
16814
Matthias Kloseb9621712010-04-24 17:59:49 +000016815as_nl='
16816'
16817export as_nl
16818# Printing a long string crashes Solaris 7 /usr/bin/printf.
16819as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16820as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16821as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16822# Prefer a ksh shell builtin over an external printf program on Solaris,
16823# but without wasting forks for bash or zsh.
16824if test -z "$BASH_VERSION$ZSH_VERSION" \
16825 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16826 as_echo='print -r --'
16827 as_echo_n='print -rn --'
16828elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16829 as_echo='printf %s\n'
16830 as_echo_n='printf %s'
16831else
16832 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16833 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16834 as_echo_n='/usr/ucb/echo -n'
16835 else
16836 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16837 as_echo_n_body='eval
16838 arg=$1;
16839 case $arg in #(
16840 *"$as_nl"*)
16841 expr "X$arg" : "X\\(.*\\)$as_nl";
16842 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16843 esac;
16844 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16845 '
16846 export as_echo_n_body
16847 as_echo_n='sh -c $as_echo_n_body as_echo'
16848 fi
16849 export as_echo_body
16850 as_echo='sh -c $as_echo_body as_echo'
16851fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016852
16853# The user is always right.
16854if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 PATH_SEPARATOR=:
16856 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16857 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16858 PATH_SEPARATOR=';'
16859 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862
16863# IFS
16864# We need space, tab and new line, in precisely that order. Quoting is
16865# there to prevent editors from complaining about space-tab.
16866# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16867# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868IFS=" "" $as_nl"
16869
16870# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016871as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016872case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873 *[\\/]* ) as_myself=$0 ;;
16874 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016875for as_dir in $PATH
16876do
16877 IFS=$as_save_IFS
16878 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016879 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16880 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883 ;;
16884esac
16885# We did not find ourselves, most probably we were run as `sh COMMAND'
16886# in which case we are not to be found in the path.
16887if test "x$as_myself" = x; then
16888 as_myself=$0
16889fi
16890if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016891 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16892 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893fi
16894
Matthias Kloseb9621712010-04-24 17:59:49 +000016895# Unset variables that we do not need and which cause bugs (e.g. in
16896# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16897# suppresses any "Segmentation fault" message there. '((' could
16898# trigger a bug in pdksh 5.2.14.
16899for as_var in BASH_ENV ENV MAIL MAILPATH
16900do eval test x\${$as_var+set} = xset \
16901 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902done
16903PS1='$ '
16904PS2='> '
16905PS4='+ '
16906
16907# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016908LC_ALL=C
16909export LC_ALL
16910LANGUAGE=C
16911export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912
Matthias Kloseb9621712010-04-24 17:59:49 +000016913# CDPATH.
16914(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16915
16916
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016917# as_fn_error STATUS ERROR [LINENO LOG_FD]
16918# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016919# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16920# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016921# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016922as_fn_error ()
16923{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016924 as_status=$1; test $as_status -eq 0 && as_status=1
16925 if test "$4"; then
16926 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16927 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016928 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016929 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016930 as_fn_exit $as_status
16931} # as_fn_error
16932
16933
16934# as_fn_set_status STATUS
16935# -----------------------
16936# Set $? to STATUS, without forking.
16937as_fn_set_status ()
16938{
16939 return $1
16940} # as_fn_set_status
16941
16942# as_fn_exit STATUS
16943# -----------------
16944# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16945as_fn_exit ()
16946{
16947 set +e
16948 as_fn_set_status $1
16949 exit $1
16950} # as_fn_exit
16951
16952# as_fn_unset VAR
16953# ---------------
16954# Portably unset VAR.
16955as_fn_unset ()
16956{
16957 { eval $1=; unset $1;}
16958}
16959as_unset=as_fn_unset
16960# as_fn_append VAR VALUE
16961# ----------------------
16962# Append the text in VALUE to the end of the definition contained in VAR. Take
16963# advantage of any shell optimizations that allow amortized linear growth over
16964# repeated appends, instead of the typical quadratic growth present in naive
16965# implementations.
16966if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16967 eval 'as_fn_append ()
16968 {
16969 eval $1+=\$2
16970 }'
16971else
16972 as_fn_append ()
16973 {
16974 eval $1=\$$1\$2
16975 }
16976fi # as_fn_append
16977
16978# as_fn_arith ARG...
16979# ------------------
16980# Perform arithmetic evaluation on the ARGs, and store the result in the
16981# global $as_val. Take advantage of shells that can avoid forks. The arguments
16982# must be portable across $(()) and expr.
16983if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16984 eval 'as_fn_arith ()
16985 {
16986 as_val=$(( $* ))
16987 }'
16988else
16989 as_fn_arith ()
16990 {
16991 as_val=`expr "$@" || test $? -eq 1`
16992 }
16993fi # as_fn_arith
16994
16995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996if expr a : '\(a\)' >/dev/null 2>&1 &&
16997 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16998 as_expr=expr
16999else
17000 as_expr=false
17001fi
17002
17003if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17004 as_basename=basename
17005else
17006 as_basename=false
17007fi
17008
Matthias Kloseb9621712010-04-24 17:59:49 +000017009if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17010 as_dirname=dirname
17011else
17012 as_dirname=false
17013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015as_me=`$as_basename -- "$0" ||
17016$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17017 X"$0" : 'X\(//\)$' \| \
17018 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017019$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020 sed '/^.*\/\([^/][^/]*\)\/*$/{
17021 s//\1/
17022 q
17023 }
17024 /^X\/\(\/\/\)$/{
17025 s//\1/
17026 q
17027 }
17028 /^X\/\(\/\).*/{
17029 s//\1/
17030 q
17031 }
17032 s/.*/./; q'`
17033
Matthias Kloseb9621712010-04-24 17:59:49 +000017034# Avoid depending upon Character Ranges.
17035as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17036as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17037as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17038as_cr_digits='0123456789'
17039as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040
17041ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017042case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017044 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 xy) ECHO_C='\c';;
17047 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17048 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049 esac;;
17050*)
17051 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017053
Martin v. Löwis11437992002-04-12 09:54:03 +000017054rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055if test -d conf$$.dir; then
17056 rm -f conf$$.dir/conf$$.file
17057else
17058 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017059 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017061if (echo >conf$$.file) 2>/dev/null; then
17062 if ln -s conf$$.file conf$$ 2>/dev/null; then
17063 as_ln_s='ln -s'
17064 # ... but there are two gotchas:
17065 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17066 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017067 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017068 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017069 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017070 elif ln conf$$.file conf$$ 2>/dev/null; then
17071 as_ln_s=ln
17072 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017073 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017074 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017075else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017076 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17079rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017080
Matthias Kloseb9621712010-04-24 17:59:49 +000017081
17082# as_fn_mkdir_p
17083# -------------
17084# Create "$as_dir" as a directory, including parents if necessary.
17085as_fn_mkdir_p ()
17086{
17087
17088 case $as_dir in #(
17089 -*) as_dir=./$as_dir;;
17090 esac
17091 test -d "$as_dir" || eval $as_mkdir_p || {
17092 as_dirs=
17093 while :; do
17094 case $as_dir in #(
17095 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17096 *) as_qdir=$as_dir;;
17097 esac
17098 as_dirs="'$as_qdir' $as_dirs"
17099 as_dir=`$as_dirname -- "$as_dir" ||
17100$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17101 X"$as_dir" : 'X\(//\)[^/]' \| \
17102 X"$as_dir" : 'X\(//\)$' \| \
17103 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17104$as_echo X"$as_dir" |
17105 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17106 s//\1/
17107 q
17108 }
17109 /^X\(\/\/\)[^/].*/{
17110 s//\1/
17111 q
17112 }
17113 /^X\(\/\/\)$/{
17114 s//\1/
17115 q
17116 }
17117 /^X\(\/\).*/{
17118 s//\1/
17119 q
17120 }
17121 s/.*/./; q'`
17122 test -d "$as_dir" && break
17123 done
17124 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017125 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017126
17127
17128} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017129if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017131else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017132 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017133 as_mkdir_p=false
17134fi
17135
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017136
17137# as_fn_executable_p FILE
17138# -----------------------
17139# Test if FILE is an executable regular file.
17140as_fn_executable_p ()
17141{
17142 test -f "$1" && test -x "$1"
17143} # as_fn_executable_p
17144as_test_x='test -x'
17145as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017146
17147# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017148as_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 +000017149
17150# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017151as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
17153
Martin v. Löwis11437992002-04-12 09:54:03 +000017154exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017155## ----------------------------------- ##
17156## Main body of $CONFIG_STATUS script. ##
17157## ----------------------------------- ##
17158_ASEOF
17159test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
Matthias Kloseb9621712010-04-24 17:59:49 +000017161cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17162# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017163# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164# values after options handling.
17165ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017166This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017167generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017168
17169 CONFIG_FILES = $CONFIG_FILES
17170 CONFIG_HEADERS = $CONFIG_HEADERS
17171 CONFIG_LINKS = $CONFIG_LINKS
17172 CONFIG_COMMANDS = $CONFIG_COMMANDS
17173 $ $0 $@
17174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175on `(hostname || uname -n) 2>/dev/null | sed 1q`
17176"
17177
Martin v. Löwis11437992002-04-12 09:54:03 +000017178_ACEOF
17179
Matthias Kloseb9621712010-04-24 17:59:49 +000017180case $ac_config_files in *"
17181"*) set x $ac_config_files; shift; ac_config_files=$*;;
17182esac
17183
17184case $ac_config_headers in *"
17185"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17186esac
17187
17188
17189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017190# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017191config_files="$ac_config_files"
17192config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017195
Matthias Kloseb9621712010-04-24 17:59:49 +000017196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017197ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017198\`$as_me' instantiates files and other configuration actions
17199from templates according to the current configuration. Unless the files
17200and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017201
Matthias Kloseb9621712010-04-24 17:59:49 +000017202Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017203
17204 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 --config print configuration, then exit
17207 -q, --quiet, --silent
17208 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017209 -d, --debug don't remove temporary files
17210 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017211 --file=FILE[:TEMPLATE]
17212 instantiate the configuration file FILE
17213 --header=FILE[:TEMPLATE]
17214 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017215
17216Configuration files:
17217$config_files
17218
17219Configuration headers:
17220$config_headers
17221
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017222Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17226ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017227ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017228python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017229configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017230 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017231
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017232Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017233This config.status script is free software; the Free Software Foundation
17234gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235
17236ac_pwd='$ac_pwd'
17237srcdir='$srcdir'
17238INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017239MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017240test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017241_ACEOF
17242
Matthias Kloseb9621712010-04-24 17:59:49 +000017243cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17244# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017245ac_need_defaults=:
17246while test $# != 0
17247do
17248 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017249 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17251 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017252 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017254 --*=)
17255 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17256 ac_optarg=
17257 ac_shift=:
17258 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017260 ac_option=$1
17261 ac_optarg=$2
17262 ac_shift=shift
17263 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017264 esac
17265
Skip Montanaro6dead952003-09-25 14:50:04 +000017266 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017267 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017268 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17269 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 $as_echo "$ac_cs_version"; exit ;;
17272 --config | --confi | --conf | --con | --co | --c )
17273 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 debug=: ;;
17276 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017277 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 case $ac_optarg in
17279 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017280 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017281 esac
17282 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 ac_need_defaults=false;;
17284 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017285 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017286 case $ac_optarg in
17287 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17288 esac
17289 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291 --he | --h)
17292 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017293 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017294Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017296 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17298 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17299 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017300
17301 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017302 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017303Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017304
Matthias Kloseb9621712010-04-24 17:59:49 +000017305 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017307
17308 esac
17309 shift
17310done
17311
Skip Montanaro6dead952003-09-25 14:50:04 +000017312ac_configure_extra_args=
17313
17314if $ac_cs_silent; then
17315 exec 6>/dev/null
17316 ac_configure_extra_args="$ac_configure_extra_args --silent"
17317fi
17318
17319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017321if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017322 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017323 shift
17324 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17325 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017327 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017328fi
17329
Martin v. Löwis11437992002-04-12 09:54:03 +000017330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332exec 5>>config.log
17333{
17334 echo
17335 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17336## Running $as_me. ##
17337_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017338 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017344
Matthias Kloseb9621712010-04-24 17:59:49 +000017345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346
17347# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017348for ac_config_target in $ac_config_targets
17349do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 case $ac_config_target in
17351 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17352 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17353 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017354 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17355 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17357 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017358 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017359 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017360 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361
Victor Stinnere0be4232011-10-25 13:06:09 +020017362 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017363 esac
17364done
17365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366
Martin v. Löwis11437992002-04-12 09:54:03 +000017367# If the user did not use the arguments to specify the items to instantiate,
17368# then the envvar interface is used. Set only those that are not.
17369# We use the long form for the default assignment because of an extremely
17370# bizarre bug on SunOS 4.1.3.
17371if $ac_need_defaults; then
17372 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17373 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17374fi
17375
Skip Montanaro6dead952003-09-25 14:50:04 +000017376# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017378# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379# Hook for its removal unless debugging.
17380# Note that there is a small window in which the directory will not be cleaned:
17381# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017382$debug ||
17383{
Victor Stinnere0be4232011-10-25 13:06:09 +020017384 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017386 : "${ac_tmp:=$tmp}"
17387 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017389 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017390}
Martin v. Löwis11437992002-04-12 09:54:03 +000017391# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017392
Martin v. Löwis11437992002-04-12 09:54:03 +000017393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017395 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017396} ||
17397{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398 tmp=./conf$$-$RANDOM
17399 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017400} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017401ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403# Set up the scripts for CONFIG_FILES section.
17404# No need to generate them if there are no CONFIG_FILES.
17405# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
Matthias Kloseb9621712010-04-24 17:59:49 +000017408
17409ac_cr=`echo X | tr X '\015'`
17410# On cygwin, bash can eat \r inside `` if the user requested igncr.
17411# But we know of no other shell where ac_cr would be empty at this
17412# point, so we can use a bashism as a fallback.
17413if test "x$ac_cr" = x; then
17414 eval ac_cr=\$\'\\r\'
17415fi
17416ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17417if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017418 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017419else
17420 ac_cs_awk_cr=$ac_cr
17421fi
17422
Victor Stinnere0be4232011-10-25 13:06:09 +020017423echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017424_ACEOF
17425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426
Matthias Kloseb9621712010-04-24 17:59:49 +000017427{
17428 echo "cat >conf$$subs.awk <<_ACEOF" &&
17429 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17430 echo "_ACEOF"
17431} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017432 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17433ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434ac_delim='%!_!# '
17435for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017437 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438
Matthias Kloseb9621712010-04-24 17:59:49 +000017439 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17440 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441 break
17442 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017443 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444 else
17445 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017446 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447done
Matthias Kloseb9621712010-04-24 17:59:49 +000017448rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449
Matthias Kloseb9621712010-04-24 17:59:49 +000017450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017451cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017453sed -n '
17454h
17455s/^/S["/; s/!.*/"]=/
17456p
17457g
17458s/^[^!]*!//
17459:repl
17460t repl
17461s/'"$ac_delim"'$//
17462t delim
17463:nl
17464h
17465s/\(.\{148\}\)..*/\1/
17466t more1
17467s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17468p
17469n
17470b repl
17471:more1
17472s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17473p
17474g
17475s/.\{148\}//
17476t nl
17477:delim
17478h
17479s/\(.\{148\}\)..*/\1/
17480t more2
17481s/["\\]/\\&/g; s/^/"/; s/$/"/
17482p
17483b
17484:more2
17485s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17486p
17487g
17488s/.\{148\}//
17489t delim
17490' <conf$$subs.awk | sed '
17491/^[^""]/{
17492 N
17493 s/\n//
17494}
17495' >>$CONFIG_STATUS || ac_write_fail=1
17496rm -f conf$$subs.awk
17497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17498_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017499cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 for (key in S) S_is_set[key] = 1
17501 FS = ""
17502
17503}
17504{
17505 line = $ 0
17506 nfields = split(line, field, "@")
17507 substed = 0
17508 len = length(field[1])
17509 for (i = 2; i < nfields; i++) {
17510 key = field[i]
17511 keylen = length(key)
17512 if (S_is_set[key]) {
17513 value = S[key]
17514 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17515 len += length(value) + length(field[++i])
17516 substed = 1
17517 } else
17518 len += 1 + keylen
17519 }
17520
17521 print line
17522}
17523
17524_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17527if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17528 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17529else
17530 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017531fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017532 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017533_ACEOF
17534
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017535# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17536# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537# trailing colons and then remove the whole line if VPATH becomes empty
17538# (actually we leave an empty line to preserve line numbers).
17539if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017540 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17541h
17542s///
17543s/^/:/
17544s/[ ]*$/:/
17545s/:\$(srcdir):/:/g
17546s/:\${srcdir}:/:/g
17547s/:@srcdir@:/:/g
17548s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017550x
17551s/\(=[ ]*\).*/\1/
17552G
17553s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554s/^[^=]*=[ ]*$//
17555}'
17556fi
17557
Matthias Kloseb9621712010-04-24 17:59:49 +000017558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017559fi # test -n "$CONFIG_FILES"
17560
Matthias Kloseb9621712010-04-24 17:59:49 +000017561# Set up the scripts for CONFIG_HEADERS section.
17562# No need to generate them if there are no CONFIG_HEADERS.
17563# This happens for instance with `./config.status Makefile'.
17564if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017565cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017566BEGIN {
17567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568
Matthias Kloseb9621712010-04-24 17:59:49 +000017569# Transform confdefs.h into an awk script `defines.awk', embedded as
17570# here-document in config.status, that substitutes the proper values into
17571# config.h.in to produce config.h.
17572
17573# Create a delimiter string that does not exist in confdefs.h, to ease
17574# handling of long lines.
17575ac_delim='%!_!# '
17576for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017577 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17578 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017579 break
17580 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017581 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 else
17583 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17584 fi
17585done
17586
17587# For the awk script, D is an array of macro values keyed by name,
17588# likewise P contains macro parameters if any. Preserve backslash
17589# newline sequences.
17590
17591ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17592sed -n '
17593s/.\{148\}/&'"$ac_delim"'/g
17594t rset
17595:rset
17596s/^[ ]*#[ ]*define[ ][ ]*/ /
17597t def
17598d
17599:def
17600s/\\$//
17601t bsnl
17602s/["\\]/\\&/g
17603s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17604D["\1"]=" \3"/p
17605s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17606d
17607:bsnl
17608s/["\\]/\\&/g
17609s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17610D["\1"]=" \3\\\\\\n"\\/p
17611t cont
17612s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17613t cont
17614d
17615:cont
17616n
17617s/.\{148\}/&'"$ac_delim"'/g
17618t clear
17619:clear
17620s/\\$//
17621t bsnlc
17622s/["\\]/\\&/g; s/^/"/; s/$/"/p
17623d
17624:bsnlc
17625s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17626b cont
17627' <confdefs.h | sed '
17628s/'"$ac_delim"'/"\\\
17629"/g' >>$CONFIG_STATUS || ac_write_fail=1
17630
17631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17632 for (key in D) D_is_set[key] = 1
17633 FS = ""
17634}
17635/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17636 line = \$ 0
17637 split(line, arg, " ")
17638 if (arg[1] == "#") {
17639 defundef = arg[2]
17640 mac1 = arg[3]
17641 } else {
17642 defundef = substr(arg[1], 2)
17643 mac1 = arg[2]
17644 }
17645 split(mac1, mac2, "(") #)
17646 macro = mac2[1]
17647 prefix = substr(line, 1, index(line, defundef) - 1)
17648 if (D_is_set[macro]) {
17649 # Preserve the white space surrounding the "#".
17650 print prefix "define", macro P[macro] D[macro]
17651 next
17652 } else {
17653 # Replace #undef with comments. This is necessary, for example,
17654 # in the case of _POSIX_SOURCE, which is predefined and required
17655 # on some systems where configure will not decide to define it.
17656 if (defundef == "undef") {
17657 print "/*", prefix defundef, macro, "*/"
17658 next
17659 }
17660 }
17661}
17662{ print }
17663_ACAWK
17664_ACEOF
17665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017666 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017667fi # test -n "$CONFIG_HEADERS"
17668
17669
17670eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17671shift
17672for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673do
17674 case $ac_tag in
17675 :[FHLC]) ac_mode=$ac_tag; continue;;
17676 esac
17677 case $ac_mode$ac_tag in
17678 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017679 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 :[FH]-) ac_tag=-:-;;
17681 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17682 esac
17683 ac_save_IFS=$IFS
17684 IFS=:
17685 set x $ac_tag
17686 IFS=$ac_save_IFS
17687 shift
17688 ac_file=$1
17689 shift
17690
17691 case $ac_mode in
17692 :L) ac_source=$1;;
17693 :[FH])
17694 ac_file_inputs=
17695 for ac_f
17696 do
17697 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017698 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699 *) # Look for the file first in the build tree, then in the source tree
17700 # (if the path is not absolute). The absolute path cannot be DOS-style,
17701 # because $ac_f cannot contain `:'.
17702 test -f "$ac_f" ||
17703 case $ac_f in
17704 [\\/$]*) false;;
17705 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17706 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017707 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017709 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17710 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711 done
17712
17713 # Let's still pretend it is `configure' which instantiates (i.e., don't
17714 # use $as_me), people would be surprised to read:
17715 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017716 configure_input='Generated from '`
17717 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17718 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 if test x"$ac_file" != x-; then
17720 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17722$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017724 # Neutralize special characters interpreted by sed in replacement strings.
17725 case $configure_input in #(
17726 *\&* | *\|* | *\\* )
17727 ac_sed_conf_input=`$as_echo "$configure_input" |
17728 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17729 *) ac_sed_conf_input=$configure_input;;
17730 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731
17732 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017733 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17734 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735 esac
17736 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 esac
17738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017740$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017741 X"$ac_file" : 'X\(//\)[^/]' \| \
17742 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017744$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17746 s//\1/
17747 q
17748 }
17749 /^X\(\/\/\)[^/].*/{
17750 s//\1/
17751 q
17752 }
17753 /^X\(\/\/\)$/{
17754 s//\1/
17755 q
17756 }
17757 /^X\(\/\).*/{
17758 s//\1/
17759 q
17760 }
17761 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017763 ac_builddir=.
17764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765case "$ac_dir" in
17766.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17767*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017768 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 case $ac_top_builddir_sub in
17772 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17773 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17774 esac ;;
17775esac
17776ac_abs_top_builddir=$ac_pwd
17777ac_abs_builddir=$ac_pwd$ac_dir_suffix
17778# for backward compatibility:
17779ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017780
17781case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017783 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784 ac_top_srcdir=$ac_top_builddir_sub
17785 ac_abs_top_srcdir=$ac_pwd ;;
17786 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017787 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 ac_top_srcdir=$srcdir
17789 ac_abs_top_srcdir=$srcdir ;;
17790 *) # Relative name.
17791 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17792 ac_top_srcdir=$ac_top_build_prefix$srcdir
17793 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017794esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017796
Martin v. Löwis11437992002-04-12 09:54:03 +000017797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798 case $ac_mode in
17799 :F)
17800 #
17801 # CONFIG_FILE
17802 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017803
17804 case $INSTALL in
17805 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017808 ac_MKDIR_P=$MKDIR_P
17809 case $MKDIR_P in
17810 [\\/$]* | ?:[\\/]* ) ;;
17811 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17812 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017813_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814
Matthias Kloseb9621712010-04-24 17:59:49 +000017815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816# If the template does not know about datarootdir, expand it.
17817# FIXME: This hack should be removed a few years after 2.60.
17818ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017819ac_sed_dataroot='
17820/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821 p
17822 q
17823}
17824/@datadir@/p
17825/@docdir@/p
17826/@infodir@/p
17827/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017828/@mandir@/p'
17829case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830*datarootdir*) ac_datarootdir_seen=yes;;
17831*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17833$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017835cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836 ac_datarootdir_hack='
17837 s&@datadir@&$datadir&g
17838 s&@docdir@&$docdir&g
17839 s&@infodir@&$infodir&g
17840 s&@localedir@&$localedir&g
17841 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017842 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843esac
17844_ACEOF
17845
17846# Neutralize VPATH when `$srcdir' = `.'.
17847# Shell code in configure.ac might set extrasub.
17848# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17850ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017851$extrasub
17852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017854:t
17855/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017856s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017858s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859s&@srcdir@&$ac_srcdir&;t t
17860s&@abs_srcdir@&$ac_abs_srcdir&;t t
17861s&@top_srcdir@&$ac_top_srcdir&;t t
17862s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17863s&@builddir@&$ac_builddir&;t t
17864s&@abs_builddir@&$ac_abs_builddir&;t t
17865s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17866s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017867s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017869"
Victor Stinnere0be4232011-10-25 13:06:09 +020017870eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17871 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017874 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17875 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17876 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017878which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017879$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017880which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017881
Victor Stinnere0be4232011-10-25 13:06:09 +020017882 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017884 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17885 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017887 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888 ;;
17889 :H)
17890 #
17891 # CONFIG_HEADER
17892 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017894 {
17895 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017896 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17897 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017898 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017899 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17901$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017903 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017904 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017905 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 fi
17907 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017909 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017910 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914
17915 esac
17916
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017917
17918 case $ac_file$ac_mode in
17919 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17920
17921 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922done # for ac_tag
17923
Guido van Rossum627b2d71993-12-24 10:39:16 +000017924
Matthias Kloseb9621712010-04-24 17:59:49 +000017925as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017926_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017927ac_clean_files=$ac_clean_files_save
17928
Matthias Kloseb9621712010-04-24 17:59:49 +000017929test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017930 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017931
Martin v. Löwis11437992002-04-12 09:54:03 +000017932
17933# configure is writing to config.log, and then calls config.status.
17934# config.status does its own redirection, appending to config.log.
17935# Unfortunately, on DOS this fails, as config.log is still kept open
17936# by configure, so config.status won't be able to write to it; its
17937# output is simply discarded. So we exec the FD to /dev/null,
17938# effectively closing config.log, so it can be properly (re)opened and
17939# appended to by config.status. When coming back to configure, we
17940# need to make the FD available again.
17941if test "$no_create" != yes; then
17942 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017943 ac_config_status_args=
17944 test "$silent" = yes &&
17945 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017947 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 exec 5>>config.log
17949 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17950 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017951 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017952fi
17953if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17955$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017956fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017957
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017958
Christian Heimes75ed8902013-11-20 01:11:18 +010017959echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017960if test ! -f Modules/Setup
17961then
17962 cp $srcdir/Modules/Setup.dist Modules/Setup
17963fi
17964
Christian Heimes75ed8902013-11-20 01:11:18 +010017965echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017966if test ! -f Modules/Setup.local
17967then
17968 echo "# Edit this file for local setup changes" >Modules/Setup.local
17969fi
17970
Christian Heimes75ed8902013-11-20 01:11:18 +010017971echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017972$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17973 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017974 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017975mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017976
17977if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17978 echo "" >&6
17979 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017980 echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017981 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017982 echo "" >&6
17983 echo "" >&6
17984fi
17985