blob: 64b75c9cd28e5654eee9cbc0c1d3fa132cc5ffec [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Ł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
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000698USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
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
Martin Panter43a94a72016-07-29 05:52:32 +0000752GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200754PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500763HAS_HG
764HGBRANCH
765HGTAG
766HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700820with_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 \
Ned Deilyee22aad2016-10-10 15:42:18 -04001286 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
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001399\`configure' configures python 3.6 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
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001465 short | recursive ) echo "Configuration of python 3.6:";;
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
Benjamin Peterson076ed002010-10-31 17:11:02 +00001479 --enable-loadable-sqlite-extensions
1480 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --enable-ipv6 Enable ipv6 (with ipv4) support
1482 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001483 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486Optional Packages:
1487 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1488 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001489 --with-universal-archs=ARCH
1490 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001491 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001492 --with-framework-name=FRAMEWORK
1493 specify an alternate name of the framework built
1494 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001496 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001497 --with-cxx-main=<compiler>
1498 compile main() and link python executable with C++
1499 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-suffix=.exe set executable suffix
1501 --with-pydebug build with Py_DEBUG defined
Brett Cannon1d8f7552016-11-03 16:20:00 -07001502 --with-optimizations Enable expensive optimizations (PGO, etc). Disabled
1503 by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-threads[=DIRECTORY]
1525 disable/enable thread support
1526 --with(out)-thread[=DIRECTORY]
1527 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001530 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001531 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with-fpectl enable SIGFPE catching
1533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001542 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001551 PKG_CONFIG path to pkg-config utility
1552 PKG_CONFIG_PATH
1553 directories to add to pkg-config's search path
1554 PKG_CONFIG_LIBDIR
1555 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Use these variables to override the choices made by `configure' or to help
1558it to find libraries and programs with nonstandard names/locations.
1559
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001560Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001563fi
1564
1565if test "$ac_init_help" = "recursive"; then
1566 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 test -d "$ac_dir" ||
1569 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1570 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_builddir=.
1572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573case "$ac_dir" in
1574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 case $ac_top_builddir_sub in
1580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1582 esac ;;
1583esac
1584ac_abs_top_builddir=$ac_pwd
1585ac_abs_builddir=$ac_pwd$ac_dir_suffix
1586# for backward compatibility:
1587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 ac_top_srcdir=$ac_top_builddir_sub
1593 ac_abs_top_srcdir=$ac_pwd ;;
1594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$srcdir
1597 ac_abs_top_srcdir=$srcdir ;;
1598 *) # Relative name.
1599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1600 ac_top_srcdir=$ac_top_build_prefix$srcdir
1601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001602esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 cd "$ac_dir" || { ac_status=$?; continue; }
1606 # Check for guested configure.
1607 if test -f "$ac_srcdir/configure.gnu"; then
1608 echo &&
1609 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1610 elif test -f "$ac_srcdir/configure"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 fi || ac_status=$?
1616 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 done
1618fi
1619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001621if $ac_init_version; then
1622 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001623python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627This configure script is free software; the Free Software Foundation
1628gives unlimited permission to copy, distribute and modify it.
1629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001632
1633## ------------------------ ##
1634## Autoconf initialization. ##
1635## ------------------------ ##
1636
1637# ac_fn_c_try_compile LINENO
1638# --------------------------
1639# Try to compile conftest.$ac_ext, and return whether this succeeded.
1640ac_fn_c_try_compile ()
1641{
1642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643 rm -f conftest.$ac_objext
1644 if { { ac_try="$ac_compile"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_compile") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } && {
1660 test -z "$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 } && test -s conftest.$ac_objext; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_compile
1674
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001675# ac_fn_c_try_cpp LINENO
1676# ----------------------
1677# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1678ac_fn_c_try_cpp ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681 if { { ac_try="$ac_cpp conftest.$ac_ext"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } > conftest.i && {
1697 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 }; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708 as_fn_set_status $ac_retval
1709
1710} # ac_fn_c_try_cpp
1711
Matthias Kloseb9621712010-04-24 17:59:49 +00001712# ac_fn_c_try_link LINENO
1713# -----------------------
1714# Try to link conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_link ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext conftest$ac_exeext
1719 if { { ac_try="$ac_link"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_link") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_c_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest$ac_exeext && {
1738 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001739 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 }; then :
1741 ac_retval=0
1742else
1743 $as_echo "$as_me: failed program was:" >&5
1744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
1748 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1749 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1750 # interfere with the next link command; also delete a directory that is
1751 # left behind by Apple's compiler. We do this before executing the actions.
1752 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_link
1757
Matthias Kloseb9621712010-04-24 17:59:49 +00001758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001769if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776 # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785 ac_header_compiler=yes
1786else
1787 ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801 ac_header_preproc=yes
1802else
1803 ac_header_preproc=no
1804fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So? What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811 yes:no: )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816 ;;
1817 no:yes:* )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001828( $as_echo "## --------------------------------------- ##
1829## Report this to https://bugs.python.org/ ##
1830## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 ) | sed "s/^/$as_me: WARNING: /" >&2
1832 ;;
1833esac
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=\$ac_header_compiler"
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
1844fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001846
1847} # ac_fn_c_check_header_mongrel
1848
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: program exited with status $ac_status" >&5
1880 $as_echo "$as_me: failed program was:" >&5
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
1883 ac_retval=$ac_status
1884fi
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_run
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_compile
1921
Matthias Kloseb9621712010-04-24 17:59:49 +00001922# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1923# -------------------------------------------
1924# Tests whether TYPE exists after having included INCLUDES, setting cache
1925# variable VAR accordingly.
1926ac_fn_c_check_type ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938int
1939main ()
1940{
1941if (sizeof ($2))
1942 return 0;
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof (($2)))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 eval "$3=yes"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_type
1975
Matthias Kloseb9621712010-04-24 17:59:49 +00001976# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1977# --------------------------------------------
1978# Tries to find the compile-time value of EXPR in a program that includes
1979# INCLUDES, setting VAR accordingly. Returns whether the value could be
1980# computed
1981ac_fn_c_compute_int ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 if test "$cross_compiling" = yes; then
1985 # Depending upon the size, compute the lo and hi bounds.
1986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 ac_lo=0 ac_mid=0
2002 while :; do
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_hi=$ac_mid; break
2019else
2020 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2021 if test $ac_lo -le $ac_mid; then
2022 ac_lo= ac_hi=
2023 break
2024 fi
2025 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028 done
2029else
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=-1 ac_mid=-1
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=$ac_mid; break
2063else
2064 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2065 if test $ac_mid -le $ac_hi; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 ac_lo= ac_hi=
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079# Binary search between lo and hi bounds.
2080while test "x$ac_lo" != "x$ac_hi"; do
2081 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid
2098else
2099 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102done
2103case $ac_lo in #((
2104?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2105'') ac_retval=1 ;;
2106esac
2107 else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111static long int longval () { return $2; }
2112static unsigned long int ulongval () { return $2; }
2113#include <stdio.h>
2114#include <stdlib.h>
2115int
2116main ()
2117{
2118
2119 FILE *f = fopen ("conftest.val", "w");
2120 if (! f)
2121 return 1;
2122 if (($2) < 0)
2123 {
2124 long int i = longval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%ld", i);
2128 }
2129 else
2130 {
2131 unsigned long int i = ulongval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%lu", i);
2135 }
2136 /* Do not output a trailing newline, as this causes \r\n confusion
2137 on some platforms. */
2138 return ferror (f) || fclose (f) != 0;
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_run "$LINENO"; then :
2145 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2146else
2147 ac_retval=1
2148fi
2149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2150 conftest.$ac_objext conftest.beam conftest.$ac_ext
2151rm -f conftest.val
2152
2153 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002154 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002155 as_fn_set_status $ac_retval
2156
2157} # ac_fn_c_compute_int
2158
2159# ac_fn_c_check_func LINENO FUNC VAR
2160# ----------------------------------
2161# Tests whether FUNC exists, setting the cache variable VAR accordingly
2162ac_fn_c_check_func ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002167if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 $as_echo_n "(cached) " >&6
2169else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2174#define $2 innocuous_$2
2175
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $2 (); below.
2178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2179 <limits.h> exists even on freestanding compilers. */
2180
2181#ifdef __STDC__
2182# include <limits.h>
2183#else
2184# include <assert.h>
2185#endif
2186
2187#undef $2
2188
2189/* Override any GCC internal prototype to avoid an error.
2190 Use char because int might match the return type of a GCC
2191 builtin and then its argument prototype would still apply. */
2192#ifdef __cplusplus
2193extern "C"
2194#endif
2195char $2 ();
2196/* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199#if defined __stub_$2 || defined __stub___$2
2200choke me
2201#endif
2202
2203int
2204main ()
2205{
2206return $2 ();
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_link "$LINENO"; then :
2212 eval "$3=yes"
2213else
2214 eval "$3=no"
2215fi
2216rm -f core conftest.err conftest.$ac_objext \
2217 conftest$ac_exeext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
2224} # ac_fn_c_check_func
2225
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002226# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2227# ---------------------------------------------
2228# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2229# accordingly.
2230ac_fn_c_check_decl ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 as_decl_name=`echo $2|sed 's/ *(.*//'`
2234 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2236$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2237if eval \${$3+:} false; then :
2238 $as_echo_n "(cached) " >&6
2239else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246#ifndef $as_decl_name
2247#ifdef __cplusplus
2248 (void) $as_decl_use;
2249#else
2250 (void) $as_decl_name;
2251#endif
2252#endif
2253
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$3=yes"
2260else
2261 eval "$3=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265eval ac_res=\$$3
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2267$as_echo "$ac_res" >&6; }
2268 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269
2270} # ac_fn_c_check_decl
2271
Matthias Kloseb9621712010-04-24 17:59:49 +00002272# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2273# ----------------------------------------------------
2274# Tries to find if the field MEMBER exists in type AGGR, after including
2275# INCLUDES, setting cache variable VAR accordingly.
2276ac_fn_c_check_member ()
2277{
2278 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2280$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002281if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$5
2287int
2288main ()
2289{
2290static $2 ac_aggr;
2291if (ac_aggr.$3)
2292return 0;
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 eval "$4=yes"
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$5
2303int
2304main ()
2305{
2306static $2 ac_aggr;
2307if (sizeof ac_aggr.$3)
2308return 0;
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$4=yes"
2315else
2316 eval "$4=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$4
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002326
2327} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002332It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002333generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# 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 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002443 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002444## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002445## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002479 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002480## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002481## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 echo
2483 for ac_var in $ac_subst_vars
2484 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 eval ac_val=\$$ac_var
2486 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 done | sort
2491 echo
2492
2493 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_files
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507 fi
2508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002511## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 fi
2517 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 $as_echo "$as_me: caught signal $ac_signal"
2519 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 rm -f core *.core core.conftest.* &&
2522 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002525for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002527done
2528ac_signal=0
2529
2530# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
Matthias Kloseb9621712010-04-24 17:59:49 +00002533$as_echo "/* confdefs.h */" > confdefs.h
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535# Predefined preprocessor variables.
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_NAME "$PACKAGE_NAME"
2539_ACEOF
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_VERSION "$PACKAGE_VERSION"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_STRING "$PACKAGE_STRING"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2555_ACEOF
2556
Matthias Kloseb9621712010-04-24 17:59:49 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_URL "$PACKAGE_URL"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002563# Prefer an explicitly selected file to automatically selected ones.
2564ac_site_file1=NONE
2565ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 # We do not want a PATH search for config.site.
2568 case $CONFIG_SITE in #((
2569 -*) ac_site_file1=./$CONFIG_SITE;;
2570 */*) ac_site_file1=$CONFIG_SITE;;
2571 *) ac_site_file1=./$CONFIG_SITE;;
2572 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$prefix/share/config.site
2575 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576else
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$ac_default_prefix/share/config.site
2578 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002580for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 test "x$ac_site_file" = xNONE && continue
2583 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2585$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 . "$ac_site_file" \
2588 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2590as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002591See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592 fi
2593done
2594
2595if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 # Some versions of bash will fail to source /dev/null (special files
2597 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2598 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2600$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2603 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 esac
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2608$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 >$cache_file
2610fi
2611
2612# Check that the precious variables saved in the cache have kept the same
2613# value.
2614ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2617 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2619 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $ac_old_set,$ac_new_set in
2621 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2623$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 +00002624 ac_cache_corrupted=: ;;
2625 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2627$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_cache_corrupted=: ;;
2629 ,);;
2630 *)
2631 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 # differences in whitespace do not lead to failure.
2633 ac_old_val_w=`echo x $ac_old_val`
2634 ac_new_val_w=`echo x $ac_new_val`
2635 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2637$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2638 ac_cache_corrupted=:
2639 else
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2641$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2642 eval $ac_var=\$ac_old_val
2643 fi
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2645$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2647$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 fi;;
2649 esac
2650 # Pass precious variables to config.status.
2651 if test "$ac_new_set" = set; then
2652 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 *) ac_arg=$ac_var=$ac_new_val ;;
2655 esac
2656 case " $ac_configure_args " in
2657 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
2661done
2662if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2666$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002669## -------------------- ##
2670## Main body of script. ##
2671## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672
Guido van Rossum7f43da71994-08-01 12:15:30 +00002673ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum627b2d71993-12-24 10:39:16 +00002679
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
Trent Nelson4d4ec652012-10-16 08:51:24 -04002681
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002682if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002683 # If we're building out-of-tree, we need to make sure the following
2684 # resources get picked up before their $srcdir counterparts.
2685 # Objects/ -> typeslots.inc
2686 # Include/ -> Python-ast.h, graminit.h
2687 # Python/ -> importlib.h
2688 # (A side effect of this is that these resources will automatically be
2689 # regenerated when building out-of-tree, regardless of whether or not
2690 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2691 # off.)
2692 BASECPPFLAGS="-IObjects -IInclude -IPython"
2693else
2694 BASECPPFLAGS=""
2695fi
2696
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002697
2698
2699
2700
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002701if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702then
2703# Extract the first word of "hg", so it can be a program name with args.
2704set dummy hg; ac_word=$2
2705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002707if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708 $as_echo_n "(cached) " >&6
2709else
2710 if test -n "$HAS_HG"; then
2711 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2712else
2713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714for as_dir in $PATH
2715do
2716 IFS=$as_save_IFS
2717 test -z "$as_dir" && as_dir=.
2718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 ac_cv_prog_HAS_HG="found"
2721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2722 break 2
2723 fi
2724done
2725 done
2726IFS=$as_save_IFS
2727
2728 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2729fi
2730fi
2731HAS_HG=$ac_cv_prog_HAS_HG
2732if test -n "$HAS_HG"; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2734$as_echo "$HAS_HG" >&6; }
2735else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737$as_echo "no" >&6; }
2738fi
2739
2740
2741else
2742HAS_HG=no-repository
2743fi
2744if test $HAS_HG = found
2745then
2746 HGVERSION="hg id -i \$(srcdir)"
2747 HGTAG="hg id -t \$(srcdir)"
2748 HGBRANCH="hg id -b \$(srcdir)"
2749else
2750 HGVERSION=""
2751 HGTAG=""
2752 HGBRANCH=""
2753fi
2754
2755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
2758
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002759ac_aux_dir=
2760for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2761 if test -f "$ac_dir/install-sh"; then
2762 ac_aux_dir=$ac_dir
2763 ac_install_sh="$ac_aux_dir/install-sh -c"
2764 break
2765 elif test -f "$ac_dir/install.sh"; then
2766 ac_aux_dir=$ac_dir
2767 ac_install_sh="$ac_aux_dir/install.sh -c"
2768 break
2769 elif test -f "$ac_dir/shtool"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/shtool install -c"
2772 break
2773 fi
2774done
2775if test -z "$ac_aux_dir"; then
2776 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2777fi
2778
2779# These three variables are undocumented and unsupported,
2780# and are intended to be withdrawn in a future Autoconf release.
2781# They can cause serious problems if a builder's source tree is in a directory
2782# whose full name contains unusual characters.
2783ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2784ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2785ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2786
2787
2788# Make sure we can run config.sub.
2789$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2790 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2791
2792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2793$as_echo_n "checking build system type... " >&6; }
2794if ${ac_cv_build+:} false; then :
2795 $as_echo_n "(cached) " >&6
2796else
2797 ac_build_alias=$build_alias
2798test "x$ac_build_alias" = x &&
2799 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2800test "x$ac_build_alias" = x &&
2801 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2802ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2803 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2804
2805fi
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2807$as_echo "$ac_cv_build" >&6; }
2808case $ac_cv_build in
2809*-*-*) ;;
2810*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2811esac
2812build=$ac_cv_build
2813ac_save_IFS=$IFS; IFS='-'
2814set x $ac_cv_build
2815shift
2816build_cpu=$1
2817build_vendor=$2
2818shift; shift
2819# Remember, the first character of IFS is used to create $*,
2820# except with old shells:
2821build_os=$*
2822IFS=$ac_save_IFS
2823case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2824
2825
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2827$as_echo_n "checking host system type... " >&6; }
2828if ${ac_cv_host+:} false; then :
2829 $as_echo_n "(cached) " >&6
2830else
2831 if test "x$host_alias" = x; then
2832 ac_cv_host=$ac_cv_build
2833else
2834 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2835 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2836fi
2837
2838fi
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2840$as_echo "$ac_cv_host" >&6; }
2841case $ac_cv_host in
2842*-*-*) ;;
2843*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2844esac
2845host=$ac_cv_host
2846ac_save_IFS=$IFS; IFS='-'
2847set x $ac_cv_host
2848shift
2849host_cpu=$1
2850host_vendor=$2
2851shift; shift
2852# Remember, the first character of IFS is used to create $*,
2853# except with old shells:
2854host_os=$*
2855IFS=$ac_save_IFS
2856case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2857
2858
2859
doko@python.orga10e4a92013-01-25 18:45:12 +01002860
2861
Ned Deilyfcbc2462014-08-22 13:32:49 -07002862# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2863rm -f pybuilddir.txt
2864
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002865for ac_prog in python$PACKAGE_VERSION python3 python
2866do
2867 # Extract the first word of "$ac_prog", so it can be a program name with args.
2868set dummy $ac_prog; ac_word=$2
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2870$as_echo_n "checking for $ac_word... " >&6; }
2871if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2872 $as_echo_n "(cached) " >&6
2873else
2874 if test -n "$PYTHON_FOR_GEN"; then
2875 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2876else
2877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2878for as_dir in $PATH
2879do
2880 IFS=$as_save_IFS
2881 test -z "$as_dir" && as_dir=.
2882 for ac_exec_ext in '' $ac_executable_extensions; do
2883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2884 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2886 break 2
2887 fi
2888done
2889 done
2890IFS=$as_save_IFS
2891
2892fi
2893fi
2894PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2895if test -n "$PYTHON_FOR_GEN"; then
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2897$as_echo "$PYTHON_FOR_GEN" >&6; }
2898else
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2900$as_echo "no" >&6; }
2901fi
2902
2903
2904 test -n "$PYTHON_FOR_GEN" && break
2905done
2906test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2907
2908if test "$PYTHON_FOR_GEN" = not-found; then
2909 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2910 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2911 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2912fi
2913
2914
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002915if test "$cross_compiling" = yes; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2917$as_echo_n "checking for python interpreter for cross build... " >&6; }
2918 if test -z "$PYTHON_FOR_BUILD"; then
2919 for interp in python$PACKAGE_VERSION python3 python; do
2920 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002921 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 +02002922 break
2923 fi
2924 interp=
2925 done
2926 if test x$interp = x; then
2927 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2928 fi
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2930$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002931 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 +02002932 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002933 # Used to comment out stuff for rebuilding generated files
2934 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002935elif test "$cross_compiling" = maybe; then
2936 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002937else
2938 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002939 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Martin Pantereac67be2016-07-28 01:28:27 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002959VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989
2990
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002996
2997
2998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003001# Arguments passed to configure.
3002
3003CONFIG_ARGS="$ac_configure_args"
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3006$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003008if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 case $enableval in
3011 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # Locate the best usable SDK, see Mac/README.txt for more
3013 # information
3014 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003015 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3018 if test ! -d "${enableval}"
3019 then
3020 enableval=/
3021 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
3025 case $enableval in
3026 no)
3027 UNIVERSALSDK=
3028 enable_universalsdk=
3029 ;;
3030 *)
3031 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 if test ! -d "${UNIVERSALSDK}"
3033 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003034 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040else
3041
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047if test -n "${UNIVERSALSDK}"
3048then
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3050$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051else
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deily87adb6e2013-10-18 21:09:56 -07003058ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060# For backward compatibility reasons we prefer to select '32-bit' if available,
3061# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063if test "`uname -s`" = "Darwin"
3064then
3065 if test -n "${UNIVERSALSDK}"
3066 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 then
3069 UNIVERSAL_ARCHS="intel"
3070 fi
3071 fi
3072fi
3073
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3076$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 UNIVERSAL_ARCHS="$withval"
3082
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083fi
3084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085if test -n "${UNIVERSALSDK}"
3086then
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3088$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3089else
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3091$as_echo "no" >&6; }
3092fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094
3095# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003096if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097 withval=$with_framework_name;
3098 PYTHONFRAMEWORK=${withval}
3099 PYTHONFRAMEWORKDIR=${withval}.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3101
3102else
3103
3104 PYTHONFRAMEWORK=Python
3105 PYTHONFRAMEWORKDIR=Python.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3107
3108fi
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003113 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003115 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 esac
3117 case $enableval in
3118 no)
3119 PYTHONFRAMEWORK=
3120 PYTHONFRAMEWORKDIR=no-framework
3121 PYTHONFRAMEWORKPREFIX=
3122 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123 FRAMEWORKINSTALLFIRST=
3124 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 FRAMEWORKALTINSTALLFIRST=
3126 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003127 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE"; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003134 ;;
3135 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003139 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3141 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003142 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 else
3149 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3150 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
3152 case "${enableval}" in
3153 /System*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 if test "${prefix}" = "NONE" ; then
3156 # See below
3157 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3158 fi
3159 ;;
3160
3161 /Library*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164
3165 */Library/Frameworks)
3166 MDIR="`dirname "${enableval}"`"
3167 MDIR="`dirname "${MDIR}"`"
3168 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3169
3170 if test "${prefix}" = "NONE"; then
3171 # User hasn't specified the
3172 # --prefix option, but wants to install
3173 # the framework in a non-default location,
3174 # ensure that the compatibility links get
3175 # installed relative to that prefix as well
3176 # instead of in /usr/local.
3177 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3178 fi
3179 ;;
3180
3181 *)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184 esac
3185
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3195
3196 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3197
Jack Jansene578a632001-08-15 01:27:14 +00003198 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum563e7081996-09-10 18:20:48 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORKPREFIX=
3205 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206 FRAMEWORKINSTALLFIRST=
3207 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 FRAMEWORKALTINSTALLFIRST=
3209 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003210 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Jack Jansene578a632001-08-15 01:27:14 +00003216 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
3222
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
3224
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228
3229
3230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
Ned Deilyb8f944f2013-11-21 22:42:25 -08003233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
3250 *-*-linux*)
3251 ac_sys_system=Linux
3252 ;;
3253 *-*-cygwin*)
3254 ac_sys_system=Cygwin
3255 ;;
3256 *)
3257 # for now, limit cross builds to known configurations
3258 MACHDEP="unknown"
3259 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3260 esac
3261 ac_sys_release=
3262 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003264 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003265 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 fi
3271 ac_md_system=`echo $ac_sys_system |
3272 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3273 ac_md_release=`echo $ac_sys_release |
3274 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3275 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003276
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003278 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003279 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003280 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003281 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003282 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284fi
Guido van Rossum91922671997-10-09 20:24:13 +00003285
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003286
3287if test "$cross_compiling" = yes; then
3288 case "$host" in
3289 *-*-linux*)
3290 case "$host_cpu" in
3291 arm*)
3292 _host_cpu=arm
3293 ;;
3294 *)
3295 _host_cpu=$host_cpu
3296 esac
3297 ;;
3298 *-*-cygwin*)
3299 _host_cpu=
3300 ;;
3301 *)
3302 # for now, limit cross builds to known configurations
3303 MACHDEP="unknown"
3304 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3305 esac
3306 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3307fi
3308
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003309# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3310# disable features if it is defined, without any means to access these
3311# features as extensions. For these systems, we skip the definition of
3312# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3313# some feature, make sure there is no alternative way to access this
3314# feature. Also, when using wildcards, make sure you have verified the
3315# need for not defining _XOPEN_SOURCE on all systems matching the
3316# wildcard, and that the wildcard does not include future systems
3317# (which may remove their limitations).
3318case $ac_sys_system/$ac_sys_release in
3319 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3320 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003321 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003322 # In addition, Stefan Krah confirms that issue #1244610 exists through
3323 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003324 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003325 define_xopen_source=no
3326 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3327 # also defined. This can be overridden by defining _BSD_SOURCE
3328 # As this has a different meaning on Linux, only define it on OpenBSD
3329
Matthias Kloseb9621712010-04-24 17:59:49 +00003330$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331
3332 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003333 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003334 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3335 # also defined. This can be overridden by defining _BSD_SOURCE
3336 # As this has a different meaning on Linux, only define it on OpenBSD
3337
Matthias Kloseb9621712010-04-24 17:59:49 +00003338$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003339
3340 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003341 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3342 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3343 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003344 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 +00003345 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003346 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3347 # request to enable features supported by the standard as a request
3348 # to disable features not supported by the standard. The best way
3349 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3350 # entirely and define __EXTENSIONS__ instead.
3351 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003352 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003353 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3354 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003355 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003356 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003357 define_xopen_source=no;;
3358 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003359 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003361 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003362 # On FreeBSD 4, the math functions C89 does not cover are never defined
3363 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3364 FreeBSD/4.*)
3365 define_xopen_source=no;;
3366 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3367 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3368 # identifies itself as Darwin/7.*
3369 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3370 # disables platform specific features beyond repair.
3371 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3372 # has no effect, don't bother defining them
3373 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003374 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003375 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003376 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003377 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3378 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3379 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003380 AIX/4)
3381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 AIX/5)
3383 if test `uname -r` -eq 1; then
3384 define_xopen_source=no
3385 fi
3386 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003387 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3388 # defining NI_NUMERICHOST.
3389 QNX/6.3.2)
3390 define_xopen_source=no
3391 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393esac
3394
3395if test $define_xopen_source = yes
3396then
Victor Stinner14d098d2011-09-07 22:29:43 +02003397 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
Victor Stinner14d098d2011-09-07 22:29:43 +02003399$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003400
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
3402 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3403 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3404 # several APIs are not declared. Since this is also needed in some
3405 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
Matthias Kloseb9621712010-04-24 17:59:49 +00003407$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
3409
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003410
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003411$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413fi
3414
Christian Heimes647cd872013-12-07 23:39:33 +01003415# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3416case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003417 hp*|HP*)
3418 define_stdc_a1=yes;;
3419 *)
3420 define_stdc_a1=no;;
3421esac
3422
3423if test $define_stdc_a1 = yes
3424then
Christian Heimes647cd872013-12-07 23:39:33 +01003425
3426$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3427
Christian Heimesb02bcae2013-12-08 15:21:08 +01003428fi
Christian Heimes647cd872013-12-07 23:39:33 +01003429
Guido van Rossum91922671997-10-09 20:24:13 +00003430#
3431# SGI compilers allow the specification of the both the ABI and the
3432# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003433# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003434#
3435# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3436# thus supply support for various ABI/ISA combinations. The MACHDEP
3437# variable is also adjusted.
3438#
3439
3440if test ! -z "$SGI_ABI"
3441then
3442 CC="cc $SGI_ABI"
3443 LDFLAGS="$SGI_ABI $LDFLAGS"
3444 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3447$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3450# it may influence the way we can build extensions, so distutils
3451# needs to check it
3452
Thomas Wouters477c8d52006-05-27 19:21:47 +00003453
Jack Jansen6b08a402004-06-03 12:41:45 +00003454CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003455EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003456
Guido van Rossum627b2d71993-12-24 10:39:16 +00003457# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003458
3459# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3460# for debug/optimization stuff. BASECFLAGS is for flags that are required
3461# just to get things to compile and link. Users are free to override OPT
3462# when running configure or make. The build should not break if they do.
3463# BASECFLAGS should generally not be messed with, however.
3464
3465# XXX shouldn't some/most/all of this code be merged with the stuff later
3466# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3468$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003471if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003473 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003474 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003475 without_gcc=yes;;
3476 yes) CC=gcc
3477 without_gcc=no;;
3478 *) CC=$withval
3479 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003480 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481else
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003483 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003484 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003485 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003486 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003487 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488fi
3489
Matthias Kloseb9621712010-04-24 17:59:49 +00003490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3491$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003492
Zachary Ware5af85642015-12-21 12:09:17 -06003493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3494$as_echo_n "checking for --with-icc... " >&6; }
3495
3496# Check whether --with-icc was given.
3497if test "${with_icc+set}" = set; then :
3498 withval=$with_icc;
3499 case $withval in
3500 no) CC=${CC:-cc}
3501 with_icc=no;;
3502 yes) CC=icc
3503 CXX=icpc
3504 with_icc=yes;;
3505 *) CC=$withval
3506 with_icc=$withval;;
3507 esac
3508else
3509
3510 with_icc=no
3511fi
3512
3513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3514$as_echo "$with_icc" >&6; }
3515
Guido van Rossum8b131c51995-03-09 14:10:13 +00003516# If the user switches compilers, we can't believe the cache
3517if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3518then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003519 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003520(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003521fi
3522
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003523# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3524# when the compiler supports them, but we don't always want -O2, and
3525# we set -g later.
3526if test -z "$CFLAGS"; then
3527 CFLAGS=
3528fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529
3530if test "$ac_sys_system" = "Darwin"
3531then
3532 # Compiler selection on MacOSX is more complicated than
3533 # AC_PROG_CC can handle, see Mac/README.txt for more
3534 # information
3535 if test -z "${CC}"
3536 then
3537 found_gcc=
3538 found_clang=
3539 as_save_IFS=$IFS; IFS=:
3540 for as_dir in $PATH
3541 do
3542 IFS=$as_save_IFS
3543 if test -x $as_dir/gcc; then
3544 if test -z "${found_gcc}"; then
3545 found_gcc=$as_dir/gcc
3546 fi
3547 fi
3548 if test -x $as_dir/clang; then
3549 if test -z "${found_clang}"; then
3550 found_clang=$as_dir/clang
3551 fi
3552 fi
3553 done
3554 IFS=$as_save_IFS
3555
3556 if test -n "$found_gcc" -a -n "$found_clang"
3557 then
3558 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3561$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3562 CC="$found_clang"
3563 CXX="$found_clang++"
3564 fi
3565
3566
3567 elif test -z "$found_gcc" -a -n "$found_clang"
3568 then
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3570$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3571 CC="$found_clang"
3572 CXX="$found_clang++"
3573
3574 elif test -z "$found_gcc" -a -z "$found_clang"
3575 then
3576 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3577 if test -n "${found_clang}"
3578 then
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3580$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3581 CC="${found_clang}"
3582 CXX="`/usr/bin/xcrun -find clang++`"
3583
3584 # else: use default behaviour
3585 fi
3586 fi
3587 fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589ac_ext=c
3590ac_cpp='$CPP $CPPFLAGS'
3591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3593ac_compiler_gnu=$ac_cv_c_compiler_gnu
3594if test -n "$ac_tool_prefix"; then
3595 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3596set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3598$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003599if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003601else
3602 if test -n "$CC"; then
3603 ac_cv_prog_CC="$CC" # Let the user override the test.
3604else
Martin v. Löwis11437992002-04-12 09:54:03 +00003605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH
3607do
3608 IFS=$as_save_IFS
3609 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003611 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 $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 +00003614 break 2
3615 fi
3616done
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003619
Jack Jansendd19cf82001-12-06 22:36:17 +00003620fi
3621fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003623if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3625$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003626else
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3628$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003629fi
3630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633if test -z "$ac_cv_prog_CC"; then
3634 ac_ct_CC=$CC
3635 # Extract the first word of "gcc", so it can be a program name with args.
3636set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3638$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003639if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003641else
3642 if test -n "$ac_ct_CC"; then
3643 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3644else
3645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3646for as_dir in $PATH
3647do
3648 IFS=$as_save_IFS
3649 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003652 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 $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 +00003654 break 2
3655 fi
3656done
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003659
3660fi
3661fi
3662ac_ct_CC=$ac_cv_prog_ac_ct_CC
3663if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3665$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3668$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669fi
3670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 if test "x$ac_ct_CC" = x; then
3672 CC=""
3673 else
3674 case $cross_compiling:$ac_tool_warned in
3675yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678ac_tool_warned=yes ;;
3679esac
3680 CC=$ac_ct_CC
3681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003682else
3683 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003684fi
3685
Jack Jansendd19cf82001-12-06 22:36:17 +00003686if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687 if test -n "$ac_tool_prefix"; then
3688 # 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 +00003689set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3691$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003692if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003694else
3695 if test -n "$CC"; then
3696 ac_cv_prog_CC="$CC" # Let the user override the test.
3697else
Martin v. Löwis11437992002-04-12 09:54:03 +00003698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699for as_dir in $PATH
3700do
3701 IFS=$as_save_IFS
3702 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $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 +00003707 break 2
3708 fi
3709done
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003712
3713fi
3714fi
3715CC=$ac_cv_prog_CC
3716if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3718$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003719else
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3721$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
3723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727if test -z "$CC"; then
3728 # Extract the first word of "cc", so it can be a program name with args.
3729set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3731$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003732if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
3735 if test -n "$CC"; then
3736 ac_cv_prog_CC="$CC" # Let the user override the test.
3737else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3747 ac_prog_rejected=yes
3748 continue
3749 fi
3750 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 $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 +00003752 break 2
3753 fi
3754done
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003757
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758if test $ac_prog_rejected = yes; then
3759 # We found a bogon in the path, so make sure we never use it.
3760 set dummy $ac_cv_prog_CC
3761 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763 # We chose a different compiler from the bogus one.
3764 # However, it has the same basename, so the bogon will be chosen
3765 # first if we set CC to just the basename; use the full file name.
3766 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003767 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 fi
3769fi
3770fi
3771fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003772CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3775$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776else
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3778$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779fi
3780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781
Martin v. Löwis11437992002-04-12 09:54:03 +00003782fi
3783if test -z "$CC"; then
3784 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 do
3787 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3790$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003791if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003793else
3794 if test -n "$CC"; then
3795 ac_cv_prog_CC="$CC" # Let the user override the test.
3796else
Martin v. Löwis11437992002-04-12 09:54:03 +00003797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3798for as_dir in $PATH
3799do
3800 IFS=$as_save_IFS
3801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 $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 +00003806 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003808done
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003811
3812fi
3813fi
3814CC=$ac_cv_prog_CC
3815if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3817$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3820$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003821fi
3822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 test -n "$CC" && break
3825 done
3826fi
3827if test -z "$CC"; then
3828 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003830do
3831 # Extract the first word of "$ac_prog", so it can be a program name with args.
3832set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003835if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003837else
3838 if test -n "$ac_ct_CC"; then
3839 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3840else
3841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844 IFS=$as_save_IFS
3845 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 $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 +00003850 break 2
3851 fi
3852done
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856fi
3857fi
3858ac_ct_CC=$ac_cv_prog_ac_ct_CC
3859if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3861$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003862else
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868 test -n "$ac_ct_CC" && break
3869done
Michael W. Hudson54241132001-12-07 15:38:26 +00003870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871 if test "x$ac_ct_CC" = x; then
3872 CC=""
3873 else
3874 case $cross_compiling:$ac_tool_warned in
3875yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878ac_tool_warned=yes ;;
3879esac
3880 CC=$ac_ct_CC
3881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003882fi
3883
3884fi
3885
3886
Matthias Kloseb9621712010-04-24 17:59:49 +00003887test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003889as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003890See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003891
3892# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003893$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3894set X $ac_compile
3895ac_compiler=$2
3896for ac_option in --version -v -V -qversion; do
3897 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898case "(($ac_try" in
3899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3900 *) ac_try_echo=$ac_try;;
3901esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3903$as_echo "$ac_try_echo"; } >&5
3904 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003906 if test -s conftest.err; then
3907 sed '10a\
3908... rest of stderr output deleted ...
3909 10q' conftest.err >conftest.er1
3910 cat conftest.er1 >&5
3911 fi
3912 rm -f conftest.er1 conftest.err
3913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3914 test $ac_status = 0; }
3915done
Martin v. Löwis11437992002-04-12 09:54:03 +00003916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003918/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003919
Martin v. Löwis11437992002-04-12 09:54:03 +00003920int
3921main ()
3922{
3923
3924 ;
3925 return 0;
3926}
3927_ACEOF
3928ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003929ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003930# Try to create an executable without -o first, disregard a.out.
3931# It will help us diagnose broken compilers, and finding out an intuition
3932# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3934$as_echo_n "checking whether the C compiler works... " >&6; }
3935ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3936
3937# The possible output files:
3938ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940ac_rmfiles=
3941for ac_file in $ac_files
3942do
3943 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3946 esac
3947done
3948rm -f $ac_rmfiles
3949
Matthias Kloseb9621712010-04-24 17:59:49 +00003950if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951case "(($ac_try" in
3952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3953 *) ac_try_echo=$ac_try;;
3954esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3956$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3960 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3962# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3963# in a Makefile. We should not override ac_cv_exeext if it was cached,
3964# so that the user can short-circuit this test for compilers unknown to
3965# Autoconf.
3966for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003967do
3968 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 ;;
3972 [ab].out )
3973 # We found the default executable, but exeext='' is most
3974 # certainly right.
3975 break;;
3976 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 then :; else
3979 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3980 fi
3981 # We set ac_cv_exeext here because the later test for it is not
3982 # safe: cross compilers may not add the suffix if given an `-o'
3983 # argument, so we may need to know it at that point already.
3984 # Even if this section looks crufty: it has the advantage of
3985 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986 break;;
3987 * )
3988 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003989 esac
3990done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991test "$ac_cv_exeext" = no && ac_cv_exeext=
3992
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003993else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 ac_file=''
3995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003996if test -z "$ac_file"; then :
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3998$as_echo "no" >&6; }
3999$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004000sed 's/^/| /' conftest.$ac_ext >&5
4001
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004006else
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4008$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4011$as_echo_n "checking for C compiler default output file name... " >&6; }
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4013$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4019$as_echo_n "checking for suffix of executables... " >&6; }
4020if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004028 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4032# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4033# work properly (i.e., refer to `conftest.exe'), while it won't with
4034# `rm'.
4035for ac_file in conftest.exe conftest conftest.*; do
4036 test -f "$ac_file" || continue
4037 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004039 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4040 break;;
4041 * ) break;;
4042 esac
4043done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004044else
Matthias Kloseb9621712010-04-24 17:59:49 +00004045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004047as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004048See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004050rm -f conftest conftest$ac_cv_exeext
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4052$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053
4054rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004055EXEEXT=$ac_cv_exeext
4056ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4058/* end confdefs.h. */
4059#include <stdio.h>
4060int
4061main ()
4062{
4063FILE *f = fopen ("conftest.out", "w");
4064 return ferror (f) || fclose (f) != 0;
4065
4066 ;
4067 return 0;
4068}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004070ac_clean_files="$ac_clean_files conftest.out"
4071# Check that the compiler produces executables we can run. If not, either
4072# the compiler is broken, or we cross compile.
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4074$as_echo_n "checking whether we are cross compiling... " >&6; }
4075if test "$cross_compiling" != yes; then
4076 { { ac_try="$ac_link"
4077case "(($ac_try" in
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4080esac
4081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082$as_echo "$ac_try_echo"; } >&5
4083 (eval "$ac_link") 2>&5
4084 ac_status=$?
4085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }
4087 if { ac_try='./conftest$ac_cv_exeext'
4088 { { case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4093$as_echo "$ac_try_echo"; } >&5
4094 (eval "$ac_try") 2>&5
4095 ac_status=$?
4096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4097 test $ac_status = 0; }; }; then
4098 cross_compiling=no
4099 else
4100 if test "$cross_compiling" = maybe; then
4101 cross_compiling=yes
4102 else
4103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004105as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004106If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004107See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 fi
4109 fi
4110fi
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4112$as_echo "$cross_compiling" >&6; }
4113
4114rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4115ac_clean_files=$ac_clean_files_save
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4117$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004118if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 $as_echo_n "(cached) " >&6
4120else
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004122/* end confdefs.h. */
4123
4124int
4125main ()
4126{
4127
4128 ;
4129 return 0;
4130}
4131_ACEOF
4132rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004133if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134case "(($ac_try" in
4135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4136 *) ac_try_echo=$ac_try;;
4137esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4139$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4143 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144 for ac_file in conftest.o conftest.obj conftest.*; do
4145 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4149 break;;
4150 esac
4151done
4152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004154sed 's/^/| /' conftest.$ac_ext >&5
4155
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004158as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004159See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004161rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4164$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004165OBJEXT=$ac_cv_objext
4166ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4168$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004169if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004174
Martin v. Löwis11437992002-04-12 09:54:03 +00004175int
4176main ()
4177{
4178#ifndef __GNUC__
4179 choke me
4180#endif
4181
4182 ;
4183 return 0;
4184}
4185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 ac_compiler_gnu=yes
4188else
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004192ac_cv_c_compiler_gnu=$ac_compiler_gnu
4193
4194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4196$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4197if test $ac_compiler_gnu = yes; then
4198 GCC=yes
4199else
4200 GCC=
4201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004202ac_test_CFLAGS=${CFLAGS+set}
4203ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4205$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004206if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004208else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209 ac_save_c_werror_flag=$ac_c_werror_flag
4210 ac_c_werror_flag=yes
4211 ac_cv_prog_cc_g=no
4212 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004215
Martin v. Löwis11437992002-04-12 09:54:03 +00004216int
4217main ()
4218{
4219
4220 ;
4221 return 0;
4222}
4223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004225 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226else
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 CFLAGS=""
4228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240
Matthias Kloseb9621712010-04-24 17:59:49 +00004241else
4242 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245/* end confdefs.h. */
4246
4247int
4248main ()
4249{
4250
4251 ;
4252 return 0;
4253}
4254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004255if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4263 ac_c_werror_flag=$ac_save_c_werror_flag
4264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4266$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269elif test $ac_cv_prog_cc_g = yes; then
4270 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004271 CFLAGS="-g -O2"
4272 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274 fi
4275else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004276 if test "$GCC" = yes; then
4277 CFLAGS="-O2"
4278 else
4279 CFLAGS=
4280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4283$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004284if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004286else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004288ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004290/* end confdefs.h. */
4291#include <stdarg.h>
4292#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004293struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4295struct buf { int x; };
4296FILE * (*rcsopen) (struct buf *, struct stat *, int);
4297static char *e (p, i)
4298 char **p;
4299 int i;
4300{
4301 return p[i];
4302}
4303static char *f (char * (*g) (char **, int), char **p, ...)
4304{
4305 char *s;
4306 va_list v;
4307 va_start (v,p);
4308 s = g (p, va_arg (v,int));
4309 va_end (v);
4310 return s;
4311}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312
4313/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4314 function prototypes and stuff, but not '\xHH' hex character constants.
4315 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004317 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4318 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4323 inside strings and character constants. */
4324#define FOO(x) 'x'
4325int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4326
Skip Montanaro6dead952003-09-25 14:50:04 +00004327int test (int i, double x);
4328struct s1 {int (*f) (int a);};
4329struct s2 {int (*f) (double a);};
4330int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4331int argc;
4332char **argv;
4333int
4334main ()
4335{
4336return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4337 ;
4338 return 0;
4339}
4340_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4342 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004343do
4344 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348rm -f core conftest.err conftest.$ac_objext
4349 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004350done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004352CC=$ac_save_CC
4353
4354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355# AC_CACHE_VAL
4356case "x$ac_cv_prog_cc_c89" in
4357 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4359$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4362$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004363 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4366$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004367esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004368if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004369
Matthias Kloseb9621712010-04-24 17:59:49 +00004370fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004371
Martin v. Löwis11437992002-04-12 09:54:03 +00004372ac_ext=c
4373ac_cpp='$CPP $CPPFLAGS'
4374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4376ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004378ac_ext=c
4379ac_cpp='$CPP $CPPFLAGS'
4380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4382ac_compiler_gnu=$ac_cv_c_compiler_gnu
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4384$as_echo_n "checking how to run the C preprocessor... " >&6; }
4385# On Suns, sometimes $CPP names a directory.
4386if test -n "$CPP" && test -d "$CPP"; then
4387 CPP=
4388fi
4389if test -z "$CPP"; then
4390 if ${ac_cv_prog_CPP+:} false; then :
4391 $as_echo_n "(cached) " >&6
4392else
4393 # Double quotes because CPP needs to be expanded
4394 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4395 do
4396 ac_preproc_ok=false
4397for ac_c_preproc_warn_flag in '' yes
4398do
4399 # Use a header file that comes with gcc, so configuring glibc
4400 # with a fresh cross-compiler works.
4401 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4402 # <limits.h> exists even on freestanding compilers.
4403 # On the NeXT, cc -E runs the code through the compiler's parser,
4404 # not just through cpp. "Syntax error" is here to catch this case.
4405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4406/* end confdefs.h. */
4407#ifdef __STDC__
4408# include <limits.h>
4409#else
4410# include <assert.h>
4411#endif
4412 Syntax error
4413_ACEOF
4414if ac_fn_c_try_cpp "$LINENO"; then :
4415
4416else
4417 # Broken: fails on valid input.
4418continue
4419fi
4420rm -f conftest.err conftest.i conftest.$ac_ext
4421
4422 # OK, works on sane cases. Now check whether nonexistent headers
4423 # can be detected and how.
4424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4425/* end confdefs.h. */
4426#include <ac_nonexistent.h>
4427_ACEOF
4428if ac_fn_c_try_cpp "$LINENO"; then :
4429 # Broken: success on invalid input.
4430continue
4431else
4432 # Passes both tests.
4433ac_preproc_ok=:
4434break
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438done
4439# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4440rm -f conftest.i conftest.err conftest.$ac_ext
4441if $ac_preproc_ok; then :
4442 break
4443fi
4444
4445 done
4446 ac_cv_prog_CPP=$CPP
4447
4448fi
4449 CPP=$ac_cv_prog_CPP
4450else
4451 ac_cv_prog_CPP=$CPP
4452fi
4453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4454$as_echo "$CPP" >&6; }
4455ac_preproc_ok=false
4456for ac_c_preproc_warn_flag in '' yes
4457do
4458 # Use a header file that comes with gcc, so configuring glibc
4459 # with a fresh cross-compiler works.
4460 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4461 # <limits.h> exists even on freestanding compilers.
4462 # On the NeXT, cc -E runs the code through the compiler's parser,
4463 # not just through cpp. "Syntax error" is here to catch this case.
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#ifdef __STDC__
4467# include <limits.h>
4468#else
4469# include <assert.h>
4470#endif
4471 Syntax error
4472_ACEOF
4473if ac_fn_c_try_cpp "$LINENO"; then :
4474
4475else
4476 # Broken: fails on valid input.
4477continue
4478fi
4479rm -f conftest.err conftest.i conftest.$ac_ext
4480
4481 # OK, works on sane cases. Now check whether nonexistent headers
4482 # can be detected and how.
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484/* end confdefs.h. */
4485#include <ac_nonexistent.h>
4486_ACEOF
4487if ac_fn_c_try_cpp "$LINENO"; then :
4488 # Broken: success on invalid input.
4489continue
4490else
4491 # Passes both tests.
4492ac_preproc_ok=:
4493break
4494fi
4495rm -f conftest.err conftest.i conftest.$ac_ext
4496
4497done
4498# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4499rm -f conftest.i conftest.err conftest.$ac_ext
4500if $ac_preproc_ok; then :
4501
4502else
4503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4505as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4506See \`config.log' for more details" "$LINENO" 5; }
4507fi
4508
4509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4516$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4517if ${ac_cv_path_GREP+:} false; then :
4518 $as_echo_n "(cached) " >&6
4519else
4520 if test -z "$GREP"; then
4521 ac_path_GREP_found=false
4522 # Loop through the user's path and test for each of PROGNAME-LIST
4523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4525do
4526 IFS=$as_save_IFS
4527 test -z "$as_dir" && as_dir=.
4528 for ac_prog in grep ggrep; do
4529 for ac_exec_ext in '' $ac_executable_extensions; do
4530 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4531 as_fn_executable_p "$ac_path_GREP" || continue
4532# Check for GNU ac_path_GREP and select it if it is found.
4533 # Check for GNU $ac_path_GREP
4534case `"$ac_path_GREP" --version 2>&1` in
4535*GNU*)
4536 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4537*)
4538 ac_count=0
4539 $as_echo_n 0123456789 >"conftest.in"
4540 while :
4541 do
4542 cat "conftest.in" "conftest.in" >"conftest.tmp"
4543 mv "conftest.tmp" "conftest.in"
4544 cp "conftest.in" "conftest.nl"
4545 $as_echo 'GREP' >> "conftest.nl"
4546 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4547 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4548 as_fn_arith $ac_count + 1 && ac_count=$as_val
4549 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4550 # Best one so far, save it but keep looking for a better one
4551 ac_cv_path_GREP="$ac_path_GREP"
4552 ac_path_GREP_max=$ac_count
4553 fi
4554 # 10*(2^10) chars as input seems more than enough
4555 test $ac_count -gt 10 && break
4556 done
4557 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4558esac
4559
4560 $ac_path_GREP_found && break 3
4561 done
4562 done
4563 done
4564IFS=$as_save_IFS
4565 if test -z "$ac_cv_path_GREP"; then
4566 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4567 fi
4568else
4569 ac_cv_path_GREP=$GREP
4570fi
4571
4572fi
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4574$as_echo "$ac_cv_path_GREP" >&6; }
4575 GREP="$ac_cv_path_GREP"
4576
4577
Łukasz Langaa785c872016-09-09 17:37:37 -07004578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4579$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4580if ${ac_cv_path_SED+:} false; then :
4581 $as_echo_n "(cached) " >&6
4582else
4583 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4584 for ac_i in 1 2 3 4 5 6 7; do
4585 ac_script="$ac_script$as_nl$ac_script"
4586 done
4587 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4588 { ac_script=; unset ac_script;}
4589 if test -z "$SED"; then
4590 ac_path_SED_found=false
4591 # Loop through the user's path and test for each of PROGNAME-LIST
4592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in $PATH
4594do
4595 IFS=$as_save_IFS
4596 test -z "$as_dir" && as_dir=.
4597 for ac_prog in sed gsed; do
4598 for ac_exec_ext in '' $ac_executable_extensions; do
4599 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4600 as_fn_executable_p "$ac_path_SED" || continue
4601# Check for GNU ac_path_SED and select it if it is found.
4602 # Check for GNU $ac_path_SED
4603case `"$ac_path_SED" --version 2>&1` in
4604*GNU*)
4605 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4606*)
4607 ac_count=0
4608 $as_echo_n 0123456789 >"conftest.in"
4609 while :
4610 do
4611 cat "conftest.in" "conftest.in" >"conftest.tmp"
4612 mv "conftest.tmp" "conftest.in"
4613 cp "conftest.in" "conftest.nl"
4614 $as_echo '' >> "conftest.nl"
4615 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4616 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4617 as_fn_arith $ac_count + 1 && ac_count=$as_val
4618 if test $ac_count -gt ${ac_path_SED_max-0}; then
4619 # Best one so far, save it but keep looking for a better one
4620 ac_cv_path_SED="$ac_path_SED"
4621 ac_path_SED_max=$ac_count
4622 fi
4623 # 10*(2^10) chars as input seems more than enough
4624 test $ac_count -gt 10 && break
4625 done
4626 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4627esac
4628
4629 $ac_path_SED_found && break 3
4630 done
4631 done
4632 done
4633IFS=$as_save_IFS
4634 if test -z "$ac_cv_path_SED"; then
4635 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4636 fi
4637else
4638 ac_cv_path_SED=$SED
4639fi
4640
4641fi
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4643$as_echo "$ac_cv_path_SED" >&6; }
4644 SED="$ac_cv_path_SED"
4645 rm -f conftest.sed
4646
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004647
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648
4649
Matthias Kloseb9621712010-04-24 17:59:49 +00004650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4651$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004654if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004655 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004656
4657 case $withval in
4658 no) with_cxx_main=no
4659 MAINCC='$(CC)';;
4660 yes) with_cxx_main=yes
4661 MAINCC='$(CXX)';;
4662 *) with_cxx_main=yes
4663 MAINCC=$withval
4664 if test -z "$CXX"
4665 then
4666 CXX=$withval
4667 fi;;
4668 esac
4669else
4670
4671 with_cxx_main=no
4672 MAINCC='$(CC)'
4673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004674fi
4675
Matthias Kloseb9621712010-04-24 17:59:49 +00004676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4677$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678
4679preset_cxx="$CXX"
4680if test -z "$CXX"
4681then
4682 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 gcc) if test -n "$ac_tool_prefix"; then
4684 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4685set dummy ${ac_tool_prefix}g++; ac_word=$2
4686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
4688if ${ac_cv_path_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690else
4691 case $CXX in
4692 [\\/]* | ?:[\\/]*)
4693 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4694 ;;
4695 *)
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in notfound
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
4707done
4708 done
4709IFS=$as_save_IFS
4710
4711 ;;
4712esac
4713fi
4714CXX=$ac_cv_path_CXX
4715if test -n "$CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4717$as_echo "$CXX" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723
4724fi
4725if test -z "$ac_cv_path_CXX"; then
4726 ac_pt_CXX=$CXX
4727 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731if ${ac_cv_path_ac_pt_CXX+:} false; then :
4732 $as_echo_n "(cached) " >&6
4733else
4734 case $ac_pt_CXX in
4735 [\\/]* | ?:[\\/]*)
4736 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4737 ;;
4738 *)
4739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in notfound
4741do
4742 IFS=$as_save_IFS
4743 test -z "$as_dir" && as_dir=.
4744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4748 break 2
4749 fi
4750done
4751 done
4752IFS=$as_save_IFS
4753
4754 ;;
4755esac
4756fi
4757ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4758if test -n "$ac_pt_CXX"; then
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4760$as_echo "$ac_pt_CXX" >&6; }
4761else
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
4764fi
4765
4766 if test "x$ac_pt_CXX" = x; then
4767 CXX="g++"
4768 else
4769 case $cross_compiling:$ac_tool_warned in
4770yes:)
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4773ac_tool_warned=yes ;;
4774esac
4775 CXX=$ac_pt_CXX
4776 fi
4777else
4778 CXX="$ac_cv_path_CXX"
4779fi
4780 ;;
4781 cc) if test -n "$ac_tool_prefix"; then
4782 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4783set dummy ${ac_tool_prefix}c++; ac_word=$2
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004786if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788else
4789 case $CXX in
4790 [\\/]* | ?:[\\/]*)
4791 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4792 ;;
4793 *)
4794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in notfound
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 break 2
4804 fi
4805done
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 ;;
4810esac
4811fi
4812CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4815$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816else
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004820
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821
4822fi
4823if test -z "$ac_cv_path_CXX"; then
4824 ac_pt_CXX=$CXX
4825 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834 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 +00004835 ;;
4836 *)
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in notfound
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846 break 2
4847 fi
4848done
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004850IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852 ;;
4853esac
4854fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4856if test -n "$ac_pt_CXX"; then
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4858$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004859else
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004863
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864 if test "x$ac_pt_CXX" = x; then
4865 CXX="c++"
4866 else
4867 case $cross_compiling:$ac_tool_warned in
4868yes:)
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4871ac_tool_warned=yes ;;
4872esac
4873 CXX=$ac_pt_CXX
4874 fi
4875else
4876 CXX="$ac_cv_path_CXX"
4877fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004878 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 clang|*/clang) if test -n "$ac_tool_prefix"; then
4880 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4881set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883$as_echo_n "checking for $ac_word... " >&6; }
4884if ${ac_cv_path_CXX+:} false; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 case $CXX in
4888 [\\/]* | ?:[\\/]*)
4889 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4890 ;;
4891 *)
4892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893for as_dir in notfound
4894do
4895 IFS=$as_save_IFS
4896 test -z "$as_dir" && as_dir=.
4897 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004899 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901 break 2
4902 fi
4903done
4904 done
4905IFS=$as_save_IFS
4906
Ned Deilycbfb9a52012-06-23 16:02:19 -07004907 ;;
4908esac
4909fi
4910CXX=$ac_cv_path_CXX
4911if test -n "$CXX"; then
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4913$as_echo "$CXX" >&6; }
4914else
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916$as_echo "no" >&6; }
4917fi
4918
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004919
4920fi
4921if test -z "$ac_cv_path_CXX"; then
4922 ac_pt_CXX=$CXX
4923 # Extract the first word of "clang++", so it can be a program name with args.
4924set dummy clang++; ac_word=$2
4925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4926$as_echo_n "checking for $ac_word... " >&6; }
4927if ${ac_cv_path_ac_pt_CXX+:} false; then :
4928 $as_echo_n "(cached) " >&6
4929else
4930 case $ac_pt_CXX in
4931 [\\/]* | ?:[\\/]*)
4932 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4933 ;;
4934 *)
4935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936for as_dir in notfound
4937do
4938 IFS=$as_save_IFS
4939 test -z "$as_dir" && as_dir=.
4940 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004942 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4944 break 2
4945 fi
4946done
4947 done
4948IFS=$as_save_IFS
4949
4950 ;;
4951esac
4952fi
4953ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4954if test -n "$ac_pt_CXX"; then
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4956$as_echo "$ac_pt_CXX" >&6; }
4957else
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4959$as_echo "no" >&6; }
4960fi
4961
4962 if test "x$ac_pt_CXX" = x; then
4963 CXX="clang++"
4964 else
4965 case $cross_compiling:$ac_tool_warned in
4966yes:)
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4968$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4969ac_tool_warned=yes ;;
4970esac
4971 CXX=$ac_pt_CXX
4972 fi
4973else
4974 CXX="$ac_cv_path_CXX"
4975fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004976 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004977 icc|*/icc) if test -n "$ac_tool_prefix"; then
4978 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4979set dummy ${ac_tool_prefix}icpc; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_CXX+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 case $CXX in
4986 [\\/]* | ?:[\\/]*)
4987 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4988 ;;
4989 *)
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in notfound
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999 break 2
5000 fi
5001done
5002 done
5003IFS=$as_save_IFS
5004
5005 ;;
5006esac
5007fi
5008CXX=$ac_cv_path_CXX
5009if test -n "$CXX"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5011$as_echo "$CXX" >&6; }
5012else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017
5018fi
5019if test -z "$ac_cv_path_CXX"; then
5020 ac_pt_CXX=$CXX
5021 # Extract the first word of "icpc", so it can be a program name with args.
5022set dummy icpc; ac_word=$2
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024$as_echo_n "checking for $ac_word... " >&6; }
5025if ${ac_cv_path_ac_pt_CXX+:} false; then :
5026 $as_echo_n "(cached) " >&6
5027else
5028 case $ac_pt_CXX in
5029 [\\/]* | ?:[\\/]*)
5030 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5031 ;;
5032 *)
5033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in notfound
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
5038 for ac_exec_ext in '' $ac_executable_extensions; do
5039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5040 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042 break 2
5043 fi
5044done
5045 done
5046IFS=$as_save_IFS
5047
5048 ;;
5049esac
5050fi
5051ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5052if test -n "$ac_pt_CXX"; then
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5054$as_echo "$ac_pt_CXX" >&6; }
5055else
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
5058fi
5059
5060 if test "x$ac_pt_CXX" = x; then
5061 CXX="icpc"
5062 else
5063 case $cross_compiling:$ac_tool_warned in
5064yes:)
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5067ac_tool_warned=yes ;;
5068esac
5069 CXX=$ac_pt_CXX
5070 fi
5071else
5072 CXX="$ac_cv_path_CXX"
5073fi
5074 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005075 esac
5076 if test "$CXX" = "notfound"
5077 then
5078 CXX=""
5079 fi
5080fi
5081if test -z "$CXX"
5082then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005083 if test -n "$ac_tool_prefix"; then
5084 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5085 do
5086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005090if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092else
5093 if test -n "$CXX"; then
5094 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5095else
5096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097for as_dir in $PATH
5098do
5099 IFS=$as_save_IFS
5100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005103 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105 break 2
5106 fi
5107done
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005109IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005110
5111fi
5112fi
5113CXX=$ac_cv_prog_CXX
5114if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5116$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117else
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120fi
5121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005122
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005123 test -n "$CXX" && break
5124 done
5125fi
5126if test -z "$CXX"; then
5127 ac_ct_CXX=$CXX
5128 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5129do
5130 # Extract the first word of "$ac_prog", so it can be a program name with args.
5131set dummy $ac_prog; ac_word=$2
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5133$as_echo_n "checking for $ac_word... " >&6; }
5134if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5135 $as_echo_n "(cached) " >&6
5136else
5137 if test -n "$ac_ct_CXX"; then
5138 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5139else
5140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5141for as_dir in $PATH
5142do
5143 IFS=$as_save_IFS
5144 test -z "$as_dir" && as_dir=.
5145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005147 ac_cv_prog_ac_ct_CXX="$ac_prog"
5148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5149 break 2
5150 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005151done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005152 done
5153IFS=$as_save_IFS
5154
5155fi
5156fi
5157ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5158if test -n "$ac_ct_CXX"; then
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5160$as_echo "$ac_ct_CXX" >&6; }
5161else
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167 test -n "$ac_ct_CXX" && break
5168done
5169
5170 if test "x$ac_ct_CXX" = x; then
5171 CXX="notfound"
5172 else
5173 case $cross_compiling:$ac_tool_warned in
5174yes:)
5175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5177ac_tool_warned=yes ;;
5178esac
5179 CXX=$ac_ct_CXX
5180 fi
5181fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182
5183 if test "$CXX" = "notfound"
5184 then
5185 CXX=""
5186 fi
5187fi
5188if test "$preset_cxx" != "$CXX"
5189then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005190 { $as_echo "$as_me:${as_lineno-$LINENO}:
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.
5194 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005195$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 By default, distutils will build C++ extension modules with \"$CXX\".
5198 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005199 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005200fi
5201
5202
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5204
5205
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5207$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5208cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef bfin
5210#undef cris
5211#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef hppa
5214#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005217#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005218#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005220#if defined(__ANDROID__)
5221# if defined(__x86_64__) && defined(__LP64__)
5222 x86_64-linux-android
5223# elif defined(__i386__)
5224 i686-linux-android
5225# elif defined(__aarch64__) && defined(__AARCH64EL__)
5226# if defined(__ILP32__)
5227 aarch64_ilp32-linux-android
5228# else
5229 aarch64-linux-android
5230# endif
5231# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5232 arm-linux-androideabi
5233# elif defined(__mips_hard_float) && defined(_MIPSEL)
5234# if _MIPS_SIM == _ABIO32
5235 mipsel-linux-android
5236# elif _MIPS_SIM == _ABI64
5237 mips64el-linux-android
5238# else
5239# error unknown platform triplet
5240# endif
5241# else
5242# error unknown platform triplet
5243# endif
5244#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005245# if defined(__x86_64__) && defined(__LP64__)
5246 x86_64-linux-gnu
5247# elif defined(__x86_64__) && defined(__ILP32__)
5248 x86_64-linux-gnux32
5249# elif defined(__i386__)
5250 i386-linux-gnu
5251# elif defined(__aarch64__) && defined(__AARCH64EL__)
5252# if defined(__ILP32__)
5253 aarch64_ilp32-linux-gnu
5254# else
5255 aarch64-linux-gnu
5256# endif
5257# elif defined(__aarch64__) && defined(__AARCH64EB__)
5258# if defined(__ILP32__)
5259 aarch64_be_ilp32-linux-gnu
5260# else
5261 aarch64_be-linux-gnu
5262# endif
5263# elif defined(__alpha__)
5264 alpha-linux-gnu
5265# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5266# if defined(__ARMEL__)
5267 arm-linux-gnueabihf
5268# else
5269 armeb-linux-gnueabihf
5270# endif
5271# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5272# if defined(__ARMEL__)
5273 arm-linux-gnueabi
5274# else
5275 armeb-linux-gnueabi
5276# endif
5277# elif defined(__hppa__)
5278 hppa-linux-gnu
5279# elif defined(__ia64__)
5280 ia64-linux-gnu
5281# elif defined(__m68k__) && !defined(__mcoldfire__)
5282 m68k-linux-gnu
5283# elif defined(__mips_hard_float) && defined(_MIPSEL)
5284# if _MIPS_SIM == _ABIO32
5285 mipsel-linux-gnu
5286# elif _MIPS_SIM == _ABIN32
5287 mips64el-linux-gnuabin32
5288# elif _MIPS_SIM == _ABI64
5289 mips64el-linux-gnuabi64
5290# else
5291# error unknown platform triplet
5292# endif
5293# elif defined(__mips_hard_float)
5294# if _MIPS_SIM == _ABIO32
5295 mips-linux-gnu
5296# elif _MIPS_SIM == _ABIN32
5297 mips64-linux-gnuabin32
5298# elif _MIPS_SIM == _ABI64
5299 mips64-linux-gnuabi64
5300# else
5301# error unknown platform triplet
5302# endif
5303# elif defined(__or1k__)
5304 or1k-linux-gnu
5305# elif defined(__powerpc__) && defined(__SPE__)
5306 powerpc-linux-gnuspe
5307# elif defined(__powerpc64__)
5308# if defined(__LITTLE_ENDIAN__)
5309 powerpc64le-linux-gnu
5310# else
5311 powerpc64-linux-gnu
5312# endif
5313# elif defined(__powerpc__)
5314 powerpc-linux-gnu
5315# elif defined(__s390x__)
5316 s390x-linux-gnu
5317# elif defined(__s390__)
5318 s390-linux-gnu
5319# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5320 sh4-linux-gnu
5321# elif defined(__sparc__) && defined(__arch64__)
5322 sparc64-linux-gnu
5323# elif defined(__sparc__)
5324 sparc-linux-gnu
5325# else
5326# error unknown platform triplet
5327# endif
5328#elif defined(__FreeBSD_kernel__)
5329# if defined(__LP64__)
5330 x86_64-kfreebsd-gnu
5331# elif defined(__i386__)
5332 i386-kfreebsd-gnu
5333# else
5334# error unknown platform triplet
5335# endif
5336#elif defined(__gnu_hurd__)
5337 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005338#elif defined(__APPLE__)
5339 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340#else
5341# error unknown platform triplet
5342#endif
5343
5344EOF
5345
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005346if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005347 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5349$as_echo "$PLATFORM_TRIPLET" >&6; }
5350else
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5352$as_echo "none" >&6; }
5353fi
5354rm -f conftest.c conftest.out
5355
5356if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5357 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5358 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5359 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005360elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5361 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005363
doko@ubuntu.com55532312016-06-14 08:55:19 +02005364if test x$MULTIARCH != x; then
5365 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5366fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005367
5368
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5370$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5371save_LDFLAGS="$LDFLAGS"
5372LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005373
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5375/* end confdefs.h. */
5376
5377int
5378main ()
5379{
5380
5381 ;
5382 return 0;
5383}
5384_ACEOF
5385if ac_fn_c_try_link "$LINENO"; then :
5386 NO_AS_NEEDED="-Wl,--no-as-needed"
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5388$as_echo "yes" >&6; }
5389else
5390 NO_AS_NEEDED=""
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392$as_echo "no" >&6; }
5393fi
5394rm -f core conftest.err conftest.$ac_objext \
5395 conftest$ac_exeext conftest.$ac_ext
5396LDFLAGS="$save_LDFLAGS"
5397
5398
5399
5400# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5403$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005404if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406else
5407 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5408 then ac_cv_path_EGREP="$GREP -E"
5409 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 # Loop through the user's path and test for each of PROGNAME-LIST
5413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5415do
5416 IFS=$as_save_IFS
5417 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 for ac_prog in egrep; do
5419 for ac_exec_ext in '' $ac_executable_extensions; do
5420 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005421 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005422# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 # Check for GNU $ac_path_EGREP
5424case `"$ac_path_EGREP" --version 2>&1` in
5425*GNU*)
5426 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5427*)
5428 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 while :
5431 do
5432 cat "conftest.in" "conftest.in" >"conftest.tmp"
5433 mv "conftest.tmp" "conftest.in"
5434 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5437 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5440 # Best one so far, save it but keep looking for a better one
5441 ac_cv_path_EGREP="$ac_path_EGREP"
5442 ac_path_EGREP_max=$ac_count
5443 fi
5444 # 10*(2^10) chars as input seems more than enough
5445 test $ac_count -gt 10 && break
5446 done
5447 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5448esac
5449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 $ac_path_EGREP_found && break 3
5451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005456 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 +00005457 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458else
5459 ac_cv_path_EGREP=$EGREP
5460fi
5461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005462 fi
5463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5465$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005466 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005467
5468
Matthias Kloseb9621712010-04-24 17:59:49 +00005469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5470$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005471if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 $as_echo_n "(cached) " >&6
5473else
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005475/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005476#include <stdlib.h>
5477#include <stdarg.h>
5478#include <string.h>
5479#include <float.h>
5480
5481int
5482main ()
5483{
5484
5485 ;
5486 return 0;
5487}
5488_ACEOF
5489if ac_fn_c_try_compile "$LINENO"; then :
5490 ac_cv_header_stdc=yes
5491else
5492 ac_cv_header_stdc=no
5493fi
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495
5496if test $ac_cv_header_stdc = yes; then
5497 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499/* end confdefs.h. */
5500#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005501
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005502_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005504 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005506else
Matthias Kloseb9621712010-04-24 17:59:49 +00005507 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005509rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
Matthias Kloseb9621712010-04-24 17:59:49 +00005511fi
5512
5513if test $ac_cv_header_stdc = yes; then
5514 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5516/* end confdefs.h. */
5517#include <stdlib.h>
5518
5519_ACEOF
5520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5521 $EGREP "free" >/dev/null 2>&1; then :
5522
5523else
5524 ac_cv_header_stdc=no
5525fi
5526rm -f conftest*
5527
5528fi
5529
5530if test $ac_cv_header_stdc = yes; then
5531 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5532 if test "$cross_compiling" = yes; then :
5533 :
5534else
5535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5536/* end confdefs.h. */
5537#include <ctype.h>
5538#include <stdlib.h>
5539#if ((' ' & 0x0FF) == 0x020)
5540# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5541# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5542#else
5543# define ISLOWER(c) \
5544 (('a' <= (c) && (c) <= 'i') \
5545 || ('j' <= (c) && (c) <= 'r') \
5546 || ('s' <= (c) && (c) <= 'z'))
5547# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5548#endif
5549
5550#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5551int
5552main ()
5553{
5554 int i;
5555 for (i = 0; i < 256; i++)
5556 if (XOR (islower (i), ISLOWER (i))
5557 || toupper (i) != TOUPPER (i))
5558 return 2;
5559 return 0;
5560}
5561_ACEOF
5562if ac_fn_c_try_run "$LINENO"; then :
5563
5564else
5565 ac_cv_header_stdc=no
5566fi
5567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5568 conftest.$ac_objext conftest.beam conftest.$ac_ext
5569fi
5570
5571fi
5572fi
5573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5574$as_echo "$ac_cv_header_stdc" >&6; }
5575if test $ac_cv_header_stdc = yes; then
5576
5577$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5578
5579fi
5580
5581# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5582for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5583 inttypes.h stdint.h unistd.h
5584do :
5585 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5586ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5587"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005588if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005589 cat >>confdefs.h <<_ACEOF
5590#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5591_ACEOF
5592
5593fi
5594
5595done
5596
5597
5598
5599 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 +02005600if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005601 MINIX=yes
5602else
5603 MINIX=
5604fi
5605
5606
5607 if test "$MINIX" = yes; then
5608
5609$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5610
5611
5612$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5613
5614
5615$as_echo "#define _MINIX 1" >>confdefs.h
5616
5617 fi
5618
5619
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5621$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005622if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005623 $as_echo_n "(cached) " >&6
5624else
5625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5626/* end confdefs.h. */
5627
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005628# define __EXTENSIONS__ 1
5629 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005630int
5631main ()
5632{
5633
5634 ;
5635 return 0;
5636}
5637_ACEOF
5638if ac_fn_c_try_compile "$LINENO"; then :
5639 ac_cv_safe_to_define___extensions__=yes
5640else
5641 ac_cv_safe_to_define___extensions__=no
5642fi
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644fi
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5646$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5647 test $ac_cv_safe_to_define___extensions__ = yes &&
5648 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5649
5650 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5651
5652 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5653
5654 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5655
5656 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5657
5658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5661$as_echo_n "checking for the Android API level... " >&6; }
5662cat >> conftest.c <<EOF
5663#ifdef __ANDROID__
5664#include <android/api-level.h>
5665__ANDROID_API__
5666#else
5667#error not Android
5668#endif
5669EOF
5670
5671if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5672 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5674$as_echo "$ANDROID_API_LEVEL" >&6; }
5675
5676cat >>confdefs.h <<_ACEOF
5677#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5678_ACEOF
5679
5680else
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5682$as_echo "not Android" >&6; }
5683fi
5684rm -f conftest.c conftest.out
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686# Check for unsupported systems
5687case $ac_sys_system/$ac_sys_release in
5688atheos*|Linux*/1*)
5689 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5690 echo See README for details.
5691 exit 1;;
5692esac
5693
5694
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5696$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005699if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 withval=$with_suffix;
5701 case $withval in
5702 no) EXEEXT=;;
5703 yes) EXEEXT=.exe;;
5704 *) EXEEXT=$withval;;
5705 esac
5706fi
5707
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5709$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
5711# Test whether we're running on a non-case-sensitive system, in which
5712# case we give a warning if no ext is given
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5715$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716if test ! -d CaseSensitiveTestDir; then
5717mkdir CaseSensitiveTestDir
5718fi
5719
5720if test -d casesensitivetestdir
5721then
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5723$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 BUILDEXEEXT=.exe
5725else
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 BUILDEXEEXT=$EXEEXT
5729fi
5730rmdir CaseSensitiveTestDir
5731
5732case $MACHDEP in
5733bsdos*)
5734 case $CC in
5735 gcc) CC="$CC -D_HAVE_BSDI";;
5736 esac;;
5737esac
5738
5739case $ac_sys_system in
5740hp*|HP*)
5741 case $CC in
5742 cc|*/cc) CC="$CC -Ae";;
5743 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744esac
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5748$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749if test -z "$LIBRARY"
5750then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005751 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5754$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
5756# LDLIBRARY is the name of the library to link against (as opposed to the
5757# name of the library into which to insert object files). BLDLIBRARY is also
5758# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5759# is blank as the main program is not linked directly against LDLIBRARY.
5760# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5761# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5762# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5763# DLLLIBRARY is the shared (i.e., DLL) library.
5764#
5765# RUNSHARED is used to run shared python without installed libraries
5766#
5767# INSTSONAME is the name of the shared library that will be use to install
5768# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005769#
5770# LDVERSION is the shared library version number, normally the Python version
5771# with the ABI build flags appended.
5772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774
5775
5776
5777
5778
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780LDLIBRARY="$LIBRARY"
5781BLDLIBRARY='$(LDLIBRARY)'
5782INSTSONAME='$(LDLIBRARY)'
5783DLLLIBRARY=''
5784LDLIBRARYDIR=''
5785RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005786LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788# LINKCC is the command that links the python executable -- default is $(CC).
5789# If CXX is set, and if it is needed to link a main function that was
5790# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5791# python might then depend on the C++ runtime
5792# This is altered for AIX in order to build the export list before
5793# linking.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5796$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797if test -z "$LINKCC"
5798then
5799 LINKCC='$(PURIFY) $(MAINCC)'
5800 case $ac_sys_system in
5801 AIX*)
5802 exp_extra="\"\""
5803 if test $ac_sys_release -ge 5 -o \
5804 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5805 exp_extra="."
5806 fi
5807 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 QNX*)
5809 # qcc must be used because the other compilers do not
5810 # support -N.
5811 LINKCC=qcc;;
5812 esac
5813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5815$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
5817# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5818# make sure we default having it set to "no": this is used by
5819# distutils.unixccompiler to know if it should add --enable-new-dtags
5820# to linker command lines, and failing to detect GNU ld simply results
5821# in the same bahaviour as before.
5822
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5824$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825ac_prog=ld
5826if test "$GCC" = yes; then
5827 ac_prog=`$CC -print-prog-name=ld`
5828fi
5829case `"$ac_prog" -V 2>&1 < /dev/null` in
5830 *GNU*)
5831 GNULD=yes;;
5832 *)
5833 GNULD=no;;
5834esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5836$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5839$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005840if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005841 $as_echo_n "(cached) " >&6
5842else
5843 ac_cv_c_inline=no
5844for ac_kw in inline __inline__ __inline; do
5845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5846/* end confdefs.h. */
5847#ifndef __cplusplus
5848typedef int foo_t;
5849static $ac_kw foo_t static_foo () {return 0; }
5850$ac_kw foo_t foo () {return 0; }
5851#endif
5852
5853_ACEOF
5854if ac_fn_c_try_compile "$LINENO"; then :
5855 ac_cv_c_inline=$ac_kw
5856fi
5857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5858 test "$ac_cv_c_inline" != no && break
5859done
5860
5861fi
5862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5863$as_echo "$ac_cv_c_inline" >&6; }
5864
5865case $ac_cv_c_inline in
5866 inline | yes) ;;
5867 *)
5868 case $ac_cv_c_inline in
5869 no) ac_val=;;
5870 *) ac_val=$ac_cv_c_inline;;
5871 esac
5872 cat >>confdefs.h <<_ACEOF
5873#ifndef __cplusplus
5874#define inline $ac_val
5875#endif
5876_ACEOF
5877 ;;
5878esac
5879
5880if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005881
5882$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005883
5884
5885fi
5886
5887
Matthias Kloseb9621712010-04-24 17:59:49 +00005888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5889$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005891if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 enableval=$enable_shared;
5893fi
5894
5895
5896if test -z "$enable_shared"
5897then
5898 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005899 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 enable_shared="yes";;
5901 *)
5902 enable_shared="no";;
5903 esac
5904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5906$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
Matthias Kloseb9621712010-04-24 17:59:49 +00005908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5909$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005911if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005912 enableval=$enable_profiling;
5913fi
5914
5915if test "x$enable_profiling" = xyes; then
5916 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005917 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919/* end confdefs.h. */
5920int main() { return 0; }
5921_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005922if ac_fn_c_try_link "$LINENO"; then :
5923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005925 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005927rm -f core conftest.err conftest.$ac_objext \
5928 conftest$ac_exeext conftest.$ac_ext
5929 CC="$ac_save_cc"
5930else
5931 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5934$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
doko@ubuntu.comba015832012-06-30 16:52:05 +02005936if test "x$enable_profiling" = xyes; then
5937 BASECFLAGS="-pg $BASECFLAGS"
5938 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
5940
Matthias Kloseb9621712010-04-24 17:59:49 +00005941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5942$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
5944# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5945# library that we build, but we do not want to link against it (we
5946# will find it with a -framework option). For this reason there is an
5947# extra variable BLDLIBRARY against which Python and the extension
5948# modules are linked, BLDLIBRARY. This is normally the same as
5949# LDLIBRARY, but empty for MacOSX framework builds.
5950if test "$enable_framework"
5951then
5952 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 BLDLIBRARY=''
5955else
5956 BLDLIBRARY='$(LDLIBRARY)'
5957fi
5958
5959# Other platforms follow
5960if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005961 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
Matthias Kloseb9621712010-04-24 17:59:49 +00005963$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964
5965 case $ac_sys_system in
5966 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 LDLIBRARY='libpython$(LDVERSION).dll.a'
5968 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ;;
5970 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).so'
5972 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005973 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005975 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005976 then
5977 PY3LIBRARY=libpython3.so
5978 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005980 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005981 LDLIBRARY='libpython$(LDVERSION).so'
5982 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005983 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005985 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005986 then
5987 PY3LIBRARY=libpython3.so
5988 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989 ;;
5990 hp*|HP*)
5991 case `uname -m` in
5992 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005993 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 ;;
5995 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005996 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 ;;
5998 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005999 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006000 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006003 LDLIBRARY='libpython$(LDVERSION).dylib'
6004 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006005 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006007 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006008 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006009 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006010 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011
6012 esac
6013else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006014 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 case $ac_sys_system in
6016 CYGWIN*)
6017 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006018 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019 ;;
6020 esac
6021fi
6022
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006023if test "$cross_compiling" = yes; then
6024 RUNSHARED=
6025fi
6026
Matthias Kloseb9621712010-04-24 17:59:49 +00006027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6028$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029
6030if test -n "$ac_tool_prefix"; then
6031 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6032set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006035if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037else
6038 if test -n "$RANLIB"; then
6039 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6040else
6041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044 IFS=$as_save_IFS
6045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 break 2
6051 fi
6052done
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054IFS=$as_save_IFS
6055
6056fi
6057fi
6058RANLIB=$ac_cv_prog_RANLIB
6059if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6061$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
6066
6067
6068fi
6069if test -z "$ac_cv_prog_RANLIB"; then
6070 ac_ct_RANLIB=$RANLIB
6071 # Extract the first word of "ranlib", so it can be a program name with args.
6072set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6074$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006075if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077else
6078 if test -n "$ac_ct_RANLIB"; then
6079 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6080else
6081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH
6083do
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090 break 2
6091 fi
6092done
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094IFS=$as_save_IFS
6095
6096fi
6097fi
6098ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6099if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6101$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102else
Matthias Kloseb9621712010-04-24 17:59:49 +00006103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105fi
6106
6107 if test "x$ac_ct_RANLIB" = x; then
6108 RANLIB=":"
6109 else
6110 case $cross_compiling:$ac_tool_warned in
6111yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114ac_tool_warned=yes ;;
6115esac
6116 RANLIB=$ac_ct_RANLIB
6117 fi
6118else
6119 RANLIB="$ac_cv_prog_RANLIB"
6120fi
6121
6122
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006123if test -n "$ac_tool_prefix"; then
6124 for ac_prog in ar aal
6125 do
6126 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6127set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6129$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006130if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132else
6133 if test -n "$AR"; then
6134 ac_cv_prog_AR="$AR" # Let the user override the test.
6135else
6136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH
6138do
6139 IFS=$as_save_IFS
6140 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006143 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145 break 2
6146 fi
6147done
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149IFS=$as_save_IFS
6150
6151fi
6152fi
6153AR=$ac_cv_prog_AR
6154if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6156$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157else
Matthias Kloseb9621712010-04-24 17:59:49 +00006158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160fi
6161
6162
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006163 test -n "$AR" && break
6164 done
6165fi
6166if test -z "$AR"; then
6167 ac_ct_AR=$AR
6168 for ac_prog in ar aal
6169do
6170 # Extract the first word of "$ac_prog", so it can be a program name with args.
6171set dummy $ac_prog; ac_word=$2
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173$as_echo_n "checking for $ac_word... " >&6; }
6174if ${ac_cv_prog_ac_ct_AR+:} false; then :
6175 $as_echo_n "(cached) " >&6
6176else
6177 if test -n "$ac_ct_AR"; then
6178 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6179else
6180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181for as_dir in $PATH
6182do
6183 IFS=$as_save_IFS
6184 test -z "$as_dir" && as_dir=.
6185 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006187 ac_cv_prog_ac_ct_AR="$ac_prog"
6188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6189 break 2
6190 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006192 done
6193IFS=$as_save_IFS
6194
6195fi
6196fi
6197ac_ct_AR=$ac_cv_prog_ac_ct_AR
6198if test -n "$ac_ct_AR"; then
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6200$as_echo "$ac_ct_AR" >&6; }
6201else
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
6204fi
6205
6206
6207 test -n "$ac_ct_AR" && break
6208done
6209
6210 if test "x$ac_ct_AR" = x; then
6211 AR="ar"
6212 else
6213 case $cross_compiling:$ac_tool_warned in
6214yes:)
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6216$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6217ac_tool_warned=yes ;;
6218esac
6219 AR=$ac_ct_AR
6220 fi
6221fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222
6223
6224# tweak ARFLAGS only if the user didn't set it on the command line
6225
6226if test -z "$ARFLAGS"
6227then
6228 ARFLAGS="rc"
6229fi
6230
doko@ubuntu.com58844492012-06-30 18:25:32 +02006231if test -n "$ac_tool_prefix"; then
6232 for ac_prog in readelf
6233 do
6234 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6237$as_echo_n "checking for $ac_word... " >&6; }
6238if ${ac_cv_prog_READELF+:} false; then :
6239 $as_echo_n "(cached) " >&6
6240else
6241 if test -n "$READELF"; then
6242 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6243else
6244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH
6246do
6247 IFS=$as_save_IFS
6248 test -z "$as_dir" && as_dir=.
6249 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006250 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006251 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6253 break 2
6254 fi
6255done
6256 done
6257IFS=$as_save_IFS
6258
6259fi
6260fi
6261READELF=$ac_cv_prog_READELF
6262if test -n "$READELF"; then
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6264$as_echo "$READELF" >&6; }
6265else
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6267$as_echo "no" >&6; }
6268fi
6269
6270
6271 test -n "$READELF" && break
6272 done
6273fi
6274if test -z "$READELF"; then
6275 ac_ct_READELF=$READELF
6276 for ac_prog in readelf
6277do
6278 # Extract the first word of "$ac_prog", so it can be a program name with args.
6279set dummy $ac_prog; ac_word=$2
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281$as_echo_n "checking for $ac_word... " >&6; }
6282if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6283 $as_echo_n "(cached) " >&6
6284else
6285 if test -n "$ac_ct_READELF"; then
6286 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6287else
6288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291 IFS=$as_save_IFS
6292 test -z "$as_dir" && as_dir=.
6293 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006294 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006295 ac_cv_prog_ac_ct_READELF="$ac_prog"
6296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297 break 2
6298 fi
6299done
6300 done
6301IFS=$as_save_IFS
6302
6303fi
6304fi
6305ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6306if test -n "$ac_ct_READELF"; then
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6308$as_echo "$ac_ct_READELF" >&6; }
6309else
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
6312fi
6313
6314
6315 test -n "$ac_ct_READELF" && break
6316done
6317
6318 if test "x$ac_ct_READELF" = x; then
6319 READELF=":"
6320 else
6321 case $cross_compiling:$ac_tool_warned in
6322yes:)
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6325ac_tool_warned=yes ;;
6326esac
6327 READELF=$ac_ct_READELF
6328 fi
6329fi
6330
6331if test "$cross_compiling" = yes; then
6332 case "$READELF" in
6333 readelf|:)
6334 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6335 ;;
6336 esac
6337fi
6338
6339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341case $MACHDEP in
6342bsdos*|hp*|HP*)
6343 # install -d does not work on BSDI or HP-UX
6344 if test -z "$INSTALL"
6345 then
6346 INSTALL="${srcdir}/install-sh -c"
6347 fi
6348esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349# Find a good install program. We prefer a C program (faster),
6350# so one script is as good as another. But avoid the broken or
6351# incompatible versions:
6352# SysV /etc/install, /usr/sbin/install
6353# SunOS /usr/etc/install
6354# IRIX /sbin/install
6355# AIX /bin/install
6356# AmigaOS /C/install, which installs bootblocks on floppy discs
6357# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6358# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6359# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6360# OS/2's system install, which has a completely different semantic
6361# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006362# Reject install programs that cannot install multiple files.
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6364$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006366if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368else
6369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372 IFS=$as_save_IFS
6373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 # Account for people who put trailing slashes in PATH elements.
6375case $as_dir/ in #((
6376 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006378 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 /usr/ucb/* ) ;;
6380 *)
6381 # OSF1 and SCO ODT 3.0 have their own names for install.
6382 # Don't use installbsd from OSF since it installs stuff as root
6383 # by default.
6384 for ac_prog in ginstall scoinst install; do
6385 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006386 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387 if test $ac_prog = install &&
6388 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6389 # AIX install. It has an incompatible calling convention.
6390 :
6391 elif test $ac_prog = install &&
6392 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6393 # program-specific install script used by HP pwplus--don't use.
6394 :
6395 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 rm -rf conftest.one conftest.two conftest.dir
6397 echo one > conftest.one
6398 echo two > conftest.two
6399 mkdir conftest.dir
6400 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6401 test -s conftest.one && test -s conftest.two &&
6402 test -s conftest.dir/conftest.one &&
6403 test -s conftest.dir/conftest.two
6404 then
6405 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6406 break 3
6407 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408 fi
6409 fi
6410 done
6411 done
6412 ;;
6413esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006414
6415 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416IFS=$as_save_IFS
6417
Matthias Kloseb9621712010-04-24 17:59:49 +00006418rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419
6420fi
6421 if test "${ac_cv_path_install+set}" = set; then
6422 INSTALL=$ac_cv_path_install
6423 else
6424 # As a last resort, use the slow shell script. Don't cache a
6425 # value for INSTALL within a source directory, because that will
6426 # break other packages using the cache if that directory is
6427 # removed, or if the value is a relative name.
6428 INSTALL=$ac_install_sh
6429 fi
6430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6432$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433
6434# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6435# It thinks the first close brace ends the variable substitution.
6436test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6437
6438test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6439
6440test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6441
Matthias Klose93a0ef12012-03-15 18:08:34 +01006442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6443$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6444if test -z "$MKDIR_P"; then
6445 if ${ac_cv_path_mkdir+:} false; then :
6446 $as_echo_n "(cached) " >&6
6447else
6448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6450do
6451 IFS=$as_save_IFS
6452 test -z "$as_dir" && as_dir=.
6453 for ac_prog in mkdir gmkdir; do
6454 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006455 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006456 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6457 'mkdir (GNU coreutils) '* | \
6458 'mkdir (coreutils) '* | \
6459 'mkdir (fileutils) '4.1*)
6460 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6461 break 3;;
6462 esac
6463 done
6464 done
6465 done
6466IFS=$as_save_IFS
6467
6468fi
6469
6470 test -d ./--version && rmdir ./--version
6471 if test "${ac_cv_path_mkdir+set}" = set; then
6472 MKDIR_P="$ac_cv_path_mkdir -p"
6473 else
6474 # As a last resort, use the slow shell script. Don't cache a
6475 # value for MKDIR_P within a source directory, because that will
6476 # break other packages using the cache if that directory is
6477 # removed, or if the value is a relative name.
6478 MKDIR_P="$ac_install_sh -d"
6479 fi
6480fi
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6482$as_echo "$MKDIR_P" >&6; }
6483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006484
6485# Not every filesystem supports hard links
6486
6487if test -z "$LN" ; then
6488 case $ac_sys_system in
6489 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490 *) LN=ln;;
6491 esac
6492fi
6493
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006494# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006495
6496ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006497
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006498# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6500$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501
6502# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006503if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 withval=$with_pydebug;
6505if test "$withval" != no
6506then
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6511$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006513 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006514else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516fi
6517else
Matthias Kloseb9621712010-04-24 17:59:49 +00006518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006520fi
6521
6522
Brett Cannon63d98bc2016-09-06 17:12:40 -07006523# Enable optimization flags
6524
6525
6526Py_OPT='false'
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6528$as_echo_n "checking for --with-optimizations... " >&6; }
6529
6530# Check whether --with-optimizations was given.
6531if test "${with_optimizations+set}" = set; then :
6532 withval=$with_optimizations;
6533if test "$withval" != no
6534then
6535 Py_OPT='true'
6536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6537$as_echo "yes" >&6; };
6538else
6539 Py_OPT='false'
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; };
6542fi
6543else
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6545$as_echo "no" >&6; }
6546fi
6547
6548if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006549 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6550 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006551 # 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 +00006552 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006553 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006555 DEF_MAKE_RULE="build_all"
6556else
6557 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006558 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006559 DEF_MAKE_RULE="all"
6560fi
6561
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006562# Enable LTO flags
6563
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6565$as_echo_n "checking for --with-lto... " >&6; }
6566
6567# Check whether --with-lto was given.
6568if test "${with_lto+set}" = set; then :
6569 withval=$with_lto;
6570if test "$withval" != no
6571then
6572 Py_LTO='true'
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6574$as_echo "yes" >&6; };
6575else
6576 Py_LTO='false'
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6578$as_echo "no" >&6; };
6579fi
6580else
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585if test "$Py_LTO" = 'true' ; then
6586 case $CC in
6587 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006588 case $ac_sys_system in
6589 Darwin*)
6590 # Any changes made here should be reflected in the GCC+Darwin case below
6591 LTOFLAGS="-flto -Wl,-export_dynamic"
6592 ;;
6593 *)
6594 LTOFLAGS="-flto"
6595 ;;
6596 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006597 ;;
6598 *gcc*)
6599 case $ac_sys_system in
6600 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006601 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006602 ;;
6603 *)
6604 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6605 ;;
6606 esac
6607 ;;
6608 esac
6609fi
6610
Brett Cannon7188a3e2015-09-18 15:13:44 -07006611# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006612
6613
6614
6615
6616
Gregory P. Smith799520c2016-09-07 16:10:00 -07006617# Make this work on systems where llvm tools are not installed with their
6618# normal names in the default $PATH (ie: Ubuntu). They exist under the
6619# non-suffixed name in their versioned llvm directory.
6620llvm_bin_dir=''
6621llvm_path="${PATH}"
6622if test "${CC}" = "clang"
6623then
6624 clang_bin=`which clang`
6625 # Some systems install clang elsewhere as a symlink to the real path
6626 # which is where the related llvm tools are located.
6627 if test -L "${clang_bin}"
6628 then
6629 clang_dir=`dirname "${clang_bin}"`
6630 clang_bin=`readlink "${clang_bin}"`
6631 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6632 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6633 fi
6634fi
Zachary Ware5af85642015-12-21 12:09:17 -06006635
Gregory P. Smith799520c2016-09-07 16:10:00 -07006636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6637$as_echo_n "checking target system type... " >&6; }
6638if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006639 $as_echo_n "(cached) " >&6
6640else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641 if test "x$target_alias" = x; then
6642 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006643else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006644 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6645 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6646fi
6647
6648fi
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6650$as_echo "$ac_cv_target" >&6; }
6651case $ac_cv_target in
6652*-*-*) ;;
6653*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6654esac
6655target=$ac_cv_target
6656ac_save_IFS=$IFS; IFS='-'
6657set x $ac_cv_target
6658shift
6659target_cpu=$1
6660target_vendor=$2
6661shift; shift
6662# Remember, the first character of IFS is used to create $*,
6663# except with old shells:
6664target_os=$*
6665IFS=$ac_save_IFS
6666case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6667
6668
6669# The aliases save the names the user supplied, while $host etc.
6670# will get canonicalized.
6671test -n "$target_alias" &&
6672 test "$program_prefix$program_suffix$program_transform_name" = \
6673 NONENONEs,x,x, &&
6674 program_prefix=${target_alias}-
6675# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6676set dummy $target_alias-llvm-profdata; ac_word=$2
6677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6678$as_echo_n "checking for $ac_word... " >&6; }
6679if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6680 $as_echo_n "(cached) " >&6
6681else
6682 case $LLVM_PROFDATA in
6683 [\\/]* | ?:[\\/]*)
6684 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6685 ;;
6686 *)
6687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6688for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006689do
6690 IFS=$as_save_IFS
6691 test -z "$as_dir" && as_dir=.
6692 for ac_exec_ext in '' $ac_executable_extensions; do
6693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006694 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6696 break 2
6697 fi
6698done
6699 done
6700IFS=$as_save_IFS
6701
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702 ;;
6703esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006704fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6706if test -n "$LLVM_PROFDATA"; then
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6708$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006709else
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6711$as_echo "no" >&6; }
6712fi
6713
6714
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6716 if test "$build" = "$target"; then
6717 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6718 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6719set dummy llvm-profdata; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6723 $as_echo_n "(cached) " >&6
6724else
6725 case $ac_pt_LLVM_PROFDATA in
6726 [\\/]* | ?:[\\/]*)
6727 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6728 ;;
6729 *)
6730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in ${llvm_path}
6732do
6733 IFS=$as_save_IFS
6734 test -z "$as_dir" && as_dir=.
6735 for ac_exec_ext in '' $ac_executable_extensions; do
6736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739 break 2
6740 fi
6741done
6742 done
6743IFS=$as_save_IFS
6744
6745 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6746 ;;
6747esac
6748fi
6749ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6750if test -n "$ac_pt_LLVM_PROFDATA"; then
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6752$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6753else
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6755$as_echo "no" >&6; }
6756fi
6757
6758 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6759 else
6760 LLVM_PROFDATA="''"
6761 fi
6762else
6763 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6764fi
6765
6766
6767if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6768then
6769 LLVM_PROF_FOUND="found"
6770else
6771 LLVM_PROF_FOUND="not-found"
6772fi
6773if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6774then
6775 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6776 if test -n "${found_llvm_profdata}"
6777 then
6778 # llvm-profdata isn't directly in $PATH in some cases.
6779 # https://apple.stackexchange.com/questions/197053/
6780 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6781 LLVM_PROF_FOUND=found
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6783$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6784 fi
6785fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006786LLVM_PROF_ERR=no
6787case $CC in
6788 *clang*)
6789 # Any changes made here should be reflected in the GCC+Darwin case below
6790 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6791 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006792 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6794 if test $LLVM_PROF_FOUND = not-found
6795 then
6796 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006797 if test "${REQUIRE_PGO}" = "yes"
6798 then
6799 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6800 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 fi
6802 ;;
6803 *gcc*)
6804 case $ac_sys_system in
6805 Darwin*)
6806 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6807 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006810 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 then
6812 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006813 if test "${REQUIRE_PGO}" = "yes"
6814 then
6815 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6816 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006817 fi
6818 ;;
6819 *)
6820 PGO_PROF_GEN_FLAG="-fprofile-generate"
6821 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6822 LLVM_PROF_MERGER="true"
6823 LLVM_PROF_FILE=""
6824 ;;
6825 esac
6826 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006827 *icc*)
6828 PGO_PROF_GEN_FLAG="-prof-gen"
6829 PGO_PROF_USE_FLAG="-prof-use"
6830 LLVM_PROF_MERGER="true"
6831 LLVM_PROF_FILE=""
6832 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833esac
6834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6836# merged with this chunk of code?
6837
6838# Optimizer/debugger flags
6839# ------------------------
6840# (The following bit of code is complicated enough - please keep things
6841# indented properly. Just pretend you're editing Python code. ;-)
6842
6843# There are two parallel sets of case statements below, one that checks to
6844# see if OPT was set and one that does BASECFLAGS setting based upon
6845# compiler and platform. BASECFLAGS tweaks need to be made even if the
6846# user set OPT.
6847
6848# tweak OPT based on compiler and platform, only if the user didn't set
6849# it on the command line
6850
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006851if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852then
6853 case $GCC in
6854 yes)
6855 if test "$CC" != 'g++' ; then
6856 STRICT_PROTO="-Wstrict-prototypes"
6857 fi
6858 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6859 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6860 WRAP="-fwrapv"
6861 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006862
6863 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006864 case $CC in
6865 *clang*) WRAP="-fwrapv"
6866 ;;
6867 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869 case $ac_cv_prog_cc_g in
6870 yes)
6871 if test "$Py_DEBUG" = 'true' ; then
6872 # Optimization messes up debuggers, so turn it off for
6873 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006874 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6875 OPT="-g -Og -Wall $STRICT_PROTO"
6876 else
6877 OPT="-g -O0 -Wall $STRICT_PROTO"
6878 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 else
6880 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6881 fi
6882 ;;
6883 *)
6884 OPT="-O3 -Wall $STRICT_PROTO"
6885 ;;
6886 esac
6887 case $ac_sys_system in
6888 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6889 ;;
6890 esac
6891 ;;
6892
6893 *)
6894 OPT="-O"
6895 ;;
6896 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897fi
6898
6899
6900
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902# The -arch flags for universal builds on OSX
6903UNIVERSAL_ARCH_FLAGS=
6904
6905
6906# tweak BASECFLAGS based on compiler and platform
6907case $GCC in
6908yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006909 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006910
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6912$as_echo_n "checking for -Wextra... " >&6; }
6913 ac_save_cc="$CC"
6914 CC="$CC -Wextra -Werror"
6915 if ${ac_cv_extra_warnings+:} false; then :
6916 $as_echo_n "(cached) " >&6
6917else
6918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6919/* end confdefs.h. */
6920
6921
6922int
6923main ()
6924{
6925
6926 ;
6927 return 0;
6928}
6929
6930_ACEOF
6931if ac_fn_c_try_compile "$LINENO"; then :
6932
6933 ac_cv_extra_warnings=yes
6934
6935else
6936
6937 ac_cv_extra_warnings=no
6938
6939fi
6940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6941fi
6942
6943 CC="$ac_save_cc"
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6945$as_echo "$ac_cv_extra_warnings" >&6; }
6946
6947 if test $ac_cv_extra_warnings = yes
6948 then
6949 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6950 fi
6951
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006952 # Python doesn't violate C99 aliasing rules, but older versions of
6953 # GCC produce warnings for legal Python code. Enable
6954 # -fno-strict-aliasing on versions of GCC that support but produce
6955 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6957$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006958 ac_save_cc="$CC"
6959 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006961 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006966
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006968int
6969main ()
6970{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006971
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006972 ;
6973 return 0;
6974}
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006977if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006978
6979 CC="$ac_save_cc -fstrict-aliasing"
6980 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982/* end confdefs.h. */
6983
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006984 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985int
6986main ()
6987{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006988double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989 ;
6990 return 0;
6991}
Matthias Kloseb159a552010-04-25 21:00:44 +00006992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006994if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
6996 ac_cv_no_strict_aliasing=no
6997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998else
Matthias Kloseb159a552010-04-25 21:00:44 +00006999
7000 ac_cv_no_strict_aliasing=yes
7001
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007002fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007005else
Matthias Kloseb159a552010-04-25 21:00:44 +00007006
7007 ac_cv_no_strict_aliasing=no
7008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007011fi
7012
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7016$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018 then
7019 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7020 fi
7021
Zachary Ware5af85642015-12-21 12:09:17 -06007022 # ICC doesn't recognize the option, but only emits a warning
7023 ## XXX does it emit an unused result warning and can it be disabled?
7024 case "$CC" in
7025 *icc*)
7026 ac_cv_disable_unused_result_warning=no
7027 ;;
7028 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7030$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7031 ac_save_cc="$CC"
7032 CC="$CC -Wunused-result -Werror"
7033 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007034 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007035 $as_echo_n "(cached) " >&6
7036else
7037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7038/* end confdefs.h. */
7039
7040
7041int
7042main ()
7043{
7044
7045 ;
7046 return 0;
7047}
7048
7049_ACEOF
7050if ac_fn_c_try_compile "$LINENO"; then :
7051
7052 ac_cv_disable_unused_result_warning=yes
7053
7054else
7055
7056 ac_cv_disable_unused_result_warning=no
7057
7058fi
7059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7060fi
7061
7062 CFLAGS="$save_CFLAGS"
7063 CC="$ac_save_cc"
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7065$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007066 ;;
7067 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007068
7069 if test $ac_cv_disable_unused_result_warning = yes
7070 then
7071 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007072 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7073 fi
7074
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7076$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7077 ac_save_cc="$CC"
7078 CC="$CC -Wunused-parameter -Werror"
7079 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7080 $as_echo_n "(cached) " >&6
7081else
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7083/* end confdefs.h. */
7084
7085
7086int
7087main ()
7088{
7089
7090 ;
7091 return 0;
7092}
7093
7094_ACEOF
7095if ac_fn_c_try_compile "$LINENO"; then :
7096
7097 ac_cv_disable_unused_parameter_warning=yes
7098
7099else
7100
7101 ac_cv_disable_unused_parameter_warning=no
7102
7103fi
7104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7105fi
7106
7107 CC="$ac_save_cc"
7108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7109$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7110
7111 if test $ac_cv_disable_unused_parameter_warning = yes
7112 then
7113 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7114 fi
7115
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7117$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7118 ac_save_cc="$CC"
7119 CC="$CC -Wmissing-field-initializers -Werror"
7120 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7121 $as_echo_n "(cached) " >&6
7122else
7123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7124/* end confdefs.h. */
7125
7126
7127int
7128main ()
7129{
7130
7131 ;
7132 return 0;
7133}
7134
7135_ACEOF
7136if ac_fn_c_try_compile "$LINENO"; then :
7137
7138 ac_cv_disable_missing_field_initializers=yes
7139
7140else
7141
7142 ac_cv_disable_missing_field_initializers=no
7143
7144fi
7145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7146fi
7147
7148 CC="$ac_save_cc"
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7150$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7151
7152 if test $ac_cv_disable_missing_field_initializers = yes
7153 then
7154 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007155 fi
7156
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7158$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7159 ac_save_cc="$CC"
7160 CC="$CC -Wsign-compare"
7161 save_CFLAGS="$CFLAGS"
7162 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7163 $as_echo_n "(cached) " >&6
7164else
7165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166/* end confdefs.h. */
7167
7168
7169int
7170main ()
7171{
7172
7173 ;
7174 return 0;
7175}
7176
7177_ACEOF
7178if ac_fn_c_try_compile "$LINENO"; then :
7179
7180 ac_cv_enable_sign_compare_warning=yes
7181
7182else
7183
7184 ac_cv_enable_sign_compare_warning=no
7185
7186fi
7187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7188fi
7189
7190 CFLAGS="$save_CFLAGS"
7191 CC="$ac_save_cc"
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7193$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7194
7195 if test $ac_cv_enable_sign_compare_warning = yes
7196 then
7197 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7198 fi
7199
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7201$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7202 ac_save_cc="$CC"
7203 CC="$CC -Wunreachable-code"
7204 save_CFLAGS="$CFLAGS"
7205 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7206 $as_echo_n "(cached) " >&6
7207else
7208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7209/* end confdefs.h. */
7210
7211
7212int
7213main ()
7214{
7215
7216 ;
7217 return 0;
7218}
7219
7220_ACEOF
7221if ac_fn_c_try_compile "$LINENO"; then :
7222
7223 ac_cv_enable_unreachable_code_warning=yes
7224
7225else
7226
7227 ac_cv_enable_unreachable_code_warning=no
7228
7229fi
7230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7231fi
7232
7233 CFLAGS="$save_CFLAGS"
7234 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007235
7236 # Don't enable unreachable code warning in debug mode, since it usually
7237 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007238 # Issue #24324: Unfortunately, the unreachable code warning does not work
7239 # correctly on gcc and has been silently removed from the compiler.
7240 # It is supported on clang but on OS X systems gcc may be an alias
7241 # for clang. Try to determine if the compiler is not really gcc and,
7242 # if so, only then enable the warning.
7243 if test $ac_cv_enable_unreachable_code_warning = yes && \
7244 test "$Py_DEBUG" != "true" && \
7245 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007246 then
7247 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007248 else
7249 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007250 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7252$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007253
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7255 # support. Without this, treatment of subnormals doesn't follow
7256 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007257 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258 alpha*)
7259 BASECFLAGS="$BASECFLAGS -mieee"
7260 ;;
7261 esac
7262
7263 case $ac_sys_system in
7264 SCO_SV*)
7265 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7266 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007267
7268 # is there any other compiler on Darwin besides gcc?
7269 Darwin*)
7270 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7271 # used to be here, but non-Apple gcc doesn't accept them.
7272 if test "${CC}" = gcc
7273 then
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007275$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007276 case "${UNIVERSALSDK}" in
7277 */MacOSX10.4u.sdk)
7278 # Build using 10.4 SDK, force usage of gcc when the
7279 # compiler is gcc, otherwise the user will get very
7280 # confusing error messages when building on OSX 10.6
7281 CC=gcc-4.0
7282 CPP=cpp-4.0
7283 ;;
7284 esac
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007286$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007287 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288
Ned Deily87adb6e2013-10-18 21:09:56 -07007289 if test "${enable_universalsdk}"
7290 then
7291 case "$UNIVERSAL_ARCHS" in
7292 32-bit)
7293 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7294 LIPO_32BIT_FLAGS=""
7295 ARCH_RUN_32BIT=""
7296 ;;
7297 64-bit)
7298 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7299 LIPO_32BIT_FLAGS=""
7300 ARCH_RUN_32BIT="true"
7301 ;;
7302 all)
7303 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7304 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7305 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7306 ;;
7307 intel)
7308 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7309 LIPO_32BIT_FLAGS="-extract i386"
7310 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7311 ;;
7312 intel-32)
7313 UNIVERSAL_ARCH_FLAGS="-arch i386"
7314 LIPO_32BIT_FLAGS=""
7315 ARCH_RUN_32BIT=""
7316 ;;
7317 3-way)
7318 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7319 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7320 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7321 ;;
7322 *)
7323 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7324 ;;
7325 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326
Ned Deily87adb6e2013-10-18 21:09:56 -07007327 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7328 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7329 if test "${UNIVERSALSDK}" != "/"
7330 then
7331 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7332 fi
7333 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334
Ned Deily87adb6e2013-10-18 21:09:56 -07007335 # Calculate an appropriate deployment target for this build:
7336 # The deployment target value is used explicitly to enable certain
7337 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007338 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 # component of the string returned by distutils.get_platform().
7340 #
7341 # Use the value from:
7342 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7343 # 2. the operating system version of the build machine if >= 10.6
7344 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7345 # below to pick either 10.3, 10.4, or 10.5 as the target.
7346 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347
Ned Deily87adb6e2013-10-18 21:09:56 -07007348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7349$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007350 cur_target_major=`sw_vers -productVersion | \
7351 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7352 cur_target_minor=`sw_vers -productVersion | \
7353 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7354 cur_target="${cur_target_major}.${cur_target_minor}"
7355 if test ${cur_target_major} -eq 10 && \
7356 test ${cur_target_minor} -ge 3 && \
7357 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007358 then
Ned Deily36820b62014-06-25 13:44:22 -07007359 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 cur_target=10.3
7361 if test ${enable_universalsdk}
7362 then
7363 case "$UNIVERSAL_ARCHS" in
7364 all|3-way|intel|64-bit)
7365 # These configurations were first supported in 10.5
7366 cur_target='10.5'
7367 ;;
7368 esac
7369 else
7370 if test `/usr/bin/arch` = "i386"
7371 then
7372 # 10.4 was the first release to support Intel archs
7373 cur_target="10.4"
7374 fi
7375 fi
7376 fi
7377 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007378
Ned Deily87adb6e2013-10-18 21:09:56 -07007379 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7380 # environment with a value that is the same as what we'll use
7381 # in the Makefile to ensure that we'll get the same compiler
7382 # environment during configure and build time.
7383 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7384 export MACOSX_DEPLOYMENT_TARGET
7385 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7387$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007388
Ned Deily87adb6e2013-10-18 21:09:56 -07007389 # end of Darwin* tests
7390 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391 esac
7392 ;;
7393
7394*)
7395 case $ac_sys_system in
7396 OpenUNIX*|UnixWare*)
7397 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7398 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399 SCO_SV*)
7400 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7401 ;;
7402 esac
7403 ;;
7404esac
7405
Zachary Ware5af85642015-12-21 12:09:17 -06007406# ICC needs -fp-model strict or floats behave badly
7407case "$CC" in
7408*icc*)
7409 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7410 ;;
7411esac
7412
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413if test "$Py_DEBUG" = 'true'; then
7414 :
7415else
7416 OPT="-DNDEBUG $OPT"
7417fi
7418
7419if test "$ac_arch_flags"
7420then
7421 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7422fi
7423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424# On some compilers, pthreads are available without further options
7425# (e.g. MacOS X). On some of these systems, the compiler will not
7426# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7427# So we have to see first whether pthreads are available without
7428# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7430$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007431if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433else
Matthias Kloseb9621712010-04-24 17:59:49 +00007434 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435 ac_cv_pthread_is_default=no
7436else
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438/* end confdefs.h. */
7439
Stefan Krah7dba5942012-11-22 22:49:11 +01007440#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441#include <pthread.h>
7442
7443void* routine(void* p){return NULL;}
7444
7445int main(){
7446 pthread_t p;
7447 if(pthread_create(&p,NULL,routine,NULL)!=0)
7448 return 1;
7449 (void)pthread_detach(p);
7450 return 0;
7451}
7452
7453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007454if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455
7456 ac_cv_pthread_is_default=yes
7457 ac_cv_kthread=no
7458 ac_cv_pthread=no
7459
7460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7464 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465fi
7466
7467
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468fi
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7471$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472
7473
7474if test $ac_cv_pthread_is_default = yes
7475then
7476 ac_cv_kpthread=no
7477else
7478# -Kpthread, if available, provides the right #defines
7479# and linker options to make pthread_create available
7480# Some compilers won't report that they do not support -Kpthread,
7481# so we need to run a program to see whether it really made the
7482# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7484$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007485if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487else
7488 ac_save_cc="$CC"
7489CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007490if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491 ac_cv_kpthread=no
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494/* end confdefs.h. */
7495
Stefan Krah7dba5942012-11-22 22:49:11 +01007496#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497#include <pthread.h>
7498
7499void* routine(void* p){return NULL;}
7500
7501int main(){
7502 pthread_t p;
7503 if(pthread_create(&p,NULL,routine,NULL)!=0)
7504 return 1;
7505 (void)pthread_detach(p);
7506 return 0;
7507}
7508
7509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007510if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511 ac_cv_kpthread=yes
7512else
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519CC="$ac_save_cc"
7520fi
7521
Matthias Kloseb9621712010-04-24 17:59:49 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7523$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524fi
7525
7526if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7527then
7528# -Kthread, if available, provides the right #defines
7529# and linker options to make pthread_create available
7530# Some compilers won't report that they do not support -Kthread,
7531# so we need to run a program to see whether it really made the
7532# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7534$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007535if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537else
7538 ac_save_cc="$CC"
7539CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007540if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541 ac_cv_kthread=no
7542else
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544/* end confdefs.h. */
7545
Stefan Krah7dba5942012-11-22 22:49:11 +01007546#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547#include <pthread.h>
7548
7549void* routine(void* p){return NULL;}
7550
7551int main(){
7552 pthread_t p;
7553 if(pthread_create(&p,NULL,routine,NULL)!=0)
7554 return 1;
7555 (void)pthread_detach(p);
7556 return 0;
7557}
7558
7559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007560if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 ac_cv_kthread=yes
7562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569CC="$ac_save_cc"
7570fi
7571
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7573$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574fi
7575
7576if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7577then
7578# -pthread, if available, provides the right #defines
7579# and linker options to make pthread_create available
7580# Some compilers won't report that they do not support -pthread,
7581# so we need to run a program to see whether it really made the
7582# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7584$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007585if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587else
7588 ac_save_cc="$CC"
7589CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007590if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591 ac_cv_pthread=no
7592else
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594/* end confdefs.h. */
7595
Stefan Krah7dba5942012-11-22 22:49:11 +01007596#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597#include <pthread.h>
7598
7599void* routine(void* p){return NULL;}
7600
7601int main(){
7602 pthread_t p;
7603 if(pthread_create(&p,NULL,routine,NULL)!=0)
7604 return 1;
7605 (void)pthread_detach(p);
7606 return 0;
7607}
7608
7609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007610if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611 ac_cv_pthread=yes
7612else
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7616 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617fi
7618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619CC="$ac_save_cc"
7620fi
7621
Matthias Kloseb9621712010-04-24 17:59:49 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7623$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624fi
7625
7626# If we have set a CC compiler flag for thread support then
7627# check if it works for CXX, too.
7628ac_cv_cxx_thread=no
7629if test ! -z "$CXX"
7630then
Matthias Kloseb9621712010-04-24 17:59:49 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7632$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633ac_save_cxx="$CXX"
7634
7635if test "$ac_cv_kpthread" = "yes"
7636then
7637 CXX="$CXX -Kpthread"
7638 ac_cv_cxx_thread=yes
7639elif test "$ac_cv_kthread" = "yes"
7640then
7641 CXX="$CXX -Kthread"
7642 ac_cv_cxx_thread=yes
7643elif test "$ac_cv_pthread" = "yes"
7644then
7645 CXX="$CXX -pthread"
7646 ac_cv_cxx_thread=yes
7647fi
7648
7649if test $ac_cv_cxx_thread = yes
7650then
7651 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7652 $CXX -c conftest.$ac_ext 2>&5
7653 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7654 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7655 then
7656 ac_cv_cxx_thread=yes
7657 else
7658 ac_cv_cxx_thread=no
7659 fi
7660 rm -fr conftest*
7661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7663$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665CXX="$ac_save_cxx"
7666
7667
7668# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7670$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007671if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673else
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675/* end confdefs.h. */
7676#include <stdlib.h>
7677#include <stdarg.h>
7678#include <string.h>
7679#include <float.h>
7680
7681int
7682main ()
7683{
7684
7685 ;
7686 return 0;
7687}
7688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007689if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690 ac_cv_header_stdc=yes
7691else
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7695
7696if test $ac_cv_header_stdc = yes; then
7697 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699/* end confdefs.h. */
7700#include <string.h>
7701
7702_ACEOF
7703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 $EGREP "memchr" >/dev/null 2>&1; then :
7705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706else
7707 ac_cv_header_stdc=no
7708fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007709rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710
7711fi
7712
7713if test $ac_cv_header_stdc = yes; then
7714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716/* end confdefs.h. */
7717#include <stdlib.h>
7718
7719_ACEOF
7720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 $EGREP "free" >/dev/null 2>&1; then :
7722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723else
7724 ac_cv_header_stdc=no
7725fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007726rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727
7728fi
7729
7730if test $ac_cv_header_stdc = yes; then
7731 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733 :
7734else
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736/* end confdefs.h. */
7737#include <ctype.h>
7738#include <stdlib.h>
7739#if ((' ' & 0x0FF) == 0x020)
7740# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7741# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7742#else
7743# define ISLOWER(c) \
7744 (('a' <= (c) && (c) <= 'i') \
7745 || ('j' <= (c) && (c) <= 'r') \
7746 || ('s' <= (c) && (c) <= 'z'))
7747# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7748#endif
7749
7750#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7751int
7752main ()
7753{
7754 int i;
7755 for (i = 0; i < 256; i++)
7756 if (XOR (islower (i), ISLOWER (i))
7757 || toupper (i) != TOUPPER (i))
7758 return 2;
7759 return 0;
7760}
7761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007762if ac_fn_c_try_run "$LINENO"; then :
7763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769fi
7770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771fi
7772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7774$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775if test $ac_cv_header_stdc = yes; then
7776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778
7779fi
7780
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007781for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007782fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007783ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007784sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007785unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007786poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007787sys/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 +01007788sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007789sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007790sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007791sys/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 -07007792libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007793linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007794sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007795do :
7796 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7797ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007798if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007800#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007801_ACEOF
7802
7803fi
7804
Guido van Rossum627b2d71993-12-24 10:39:16 +00007805done
7806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007807ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007808for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7811$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007812if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814else
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007816/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007817#include <sys/types.h>
7818#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Martin v. Löwis11437992002-04-12 09:54:03 +00007820int
7821main ()
7822{
7823if ((DIR *) 0)
7824return 0;
7825 ;
7826 return 0;
7827}
7828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007831else
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836eval ac_res=\$$as_ac_Header
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7838$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007839if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007841#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007842_ACEOF
7843
7844ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007845fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847done
7848# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7849if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7851$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854else
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859/* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007862#ifdef __cplusplus
7863extern "C"
7864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007865char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007866int
7867main ()
7868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ;
7871 return 0;
7872}
7873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874for ac_lib in '' dir; do
7875 if test -z "$ac_lib"; then
7876 ac_res="none required"
7877 else
7878 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884rm -f core conftest.err conftest.$ac_objext \
7885 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007886 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889done
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892else
7893 ac_cv_search_opendir=no
7894fi
7895rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_func_search_save_LIBS
7897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7899$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007901if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007905
Michael W. Hudson54241132001-12-07 15:38:26 +00007906else
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7908$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007909if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007911else
7912 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916/* Override any GCC internal prototype to avoid an error.
7917 Use char because int might match the return type of a GCC
7918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007919#ifdef __cplusplus
7920extern "C"
7921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007922char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007923int
7924main ()
7925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007926return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ;
7928 return 0;
7929}
7930_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931for ac_lib in '' x; do
7932 if test -z "$ac_lib"; then
7933 ac_res="none required"
7934 else
7935 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007941rm -f core conftest.err conftest.$ac_objext \
7942 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007943 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946done
Victor Stinnere0be4232011-10-25 13:06:09 +02007947if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949else
7950 ac_cv_search_opendir=no
7951fi
7952rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007953LIBS=$ac_func_search_save_LIBS
7954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7956$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007958if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007960
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007961fi
7962
7963fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007964
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7966$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007967if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007969else
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007971/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007972#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007973int
7974main ()
7975{
7976return makedev(0, 0);
7977 ;
7978 return 0;
7979}
7980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007981if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007982 ac_cv_header_sys_types_h_makedev=yes
7983else
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986rm -f core conftest.err conftest.$ac_objext \
7987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007988
7989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7991$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007992
7993if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007994ac_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 +02007995if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007998
7999fi
8000
8001
8002
8003 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 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 +02008005if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008006
Matthias Kloseb9621712010-04-24 17:59:49 +00008007$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008008
8009fi
8010
8011
8012 fi
8013fi
8014
Michael W. Hudson54241132001-12-07 15:38:26 +00008015
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008016# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8017# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8018SAVE_CFLAGS=$CFLAGS
8019CFLAGS="-std=c99 $CFLAGS"
8020for ac_header in bluetooth/bluetooth.h
8021do :
8022 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8023if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8024 cat >>confdefs.h <<_ACEOF
8025#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8026_ACEOF
8027
8028fi
8029
8030done
8031
8032CFLAGS=$SAVE_CFLAGS
8033
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008034# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8035for ac_header in net/if.h
8036do :
8037 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8038#ifdef STDC_HEADERS
8039# include <stdlib.h>
8040# include <stddef.h>
8041#else
8042# ifdef HAVE_STDLIB_H
8043# include <stdlib.h>
8044# endif
8045#endif
8046#ifdef HAVE_SYS_SOCKET_H
8047# include <sys/socket.h>
8048#endif
8049
8050"
Victor Stinnere0be4232011-10-25 13:06:09 +02008051if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008052 cat >>confdefs.h <<_ACEOF
8053#define HAVE_NET_IF_H 1
8054_ACEOF
8055
8056fi
8057
8058done
8059
8060
Martin v. Löwis11017b12006-01-14 18:12:57 +00008061# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008062for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008063do :
8064 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 +00008065#ifdef HAVE_ASM_TYPES_H
8066#include <asm/types.h>
8067#endif
8068#ifdef HAVE_SYS_SOCKET_H
8069#include <sys/socket.h>
8070#endif
8071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072"
Victor Stinnere0be4232011-10-25 13:06:09 +02008073if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008074 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008075#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008076_ACEOF
8077
8078fi
8079
8080done
8081
8082
Charles-François Natali47413c12011-10-06 19:47:44 +02008083# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008084for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008085do :
8086 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8087ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8088#ifdef HAVE_SYS_SOCKET_H
8089#include <sys/socket.h>
8090#endif
8091
8092"
8093if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8094 cat >>confdefs.h <<_ACEOF
8095#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8096_ACEOF
8097
8098fi
8099
8100done
8101
8102
Guido van Rossum627b2d71993-12-24 10:39:16 +00008103# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008104was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8106$as_echo_n "checking for clock_t in time.h... " >&6; }
8107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008109#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
8111_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008114 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008115else
Martin v. Löwis11437992002-04-12 09:54:03 +00008116
8117
Matthias Kloseb9621712010-04-24 17:59:49 +00008118$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008120
Guido van Rossum627b2d71993-12-24 10:39:16 +00008121fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008122rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8125$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8128$as_echo_n "checking for makedev... " >&6; }
8129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008130/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008131
Jesus Cea740f53a2010-04-28 11:35:30 +00008132#if defined(MAJOR_IN_MKDEV)
8133#include <sys/mkdev.h>
8134#elif defined(MAJOR_IN_SYSMACROS)
8135#include <sys/sysmacros.h>
8136#else
8137#include <sys/types.h>
8138#endif
8139
Neal Norwitz11690112002-07-30 01:08:28 +00008140int
8141main ()
8142{
Jesus Cea740f53a2010-04-28 11:35:30 +00008143
8144 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008145 ;
8146 return 0;
8147}
Matthias Kloseb159a552010-04-25 21:00:44 +00008148
Neal Norwitz11690112002-07-30 01:08:28 +00008149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008150if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008151 ac_cv_has_makedev=yes
8152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008155rm -f core conftest.err conftest.$ac_objext \
8156 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8158$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008159if test "$ac_cv_has_makedev" = "yes"; then
8160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008162
8163fi
8164
Christian Heimes985ecdc2013-11-20 11:46:18 +01008165# byte swapping
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8167$as_echo_n "checking for le64toh... " >&6; }
8168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8169/* end confdefs.h. */
8170
8171#ifdef HAVE_ENDIAN_H
8172#include <endian.h>
8173#elif defined(HAVE_SYS_ENDIAN_H)
8174#include <sys/endian.h>
8175#endif
8176
8177int
8178main ()
8179{
8180
8181 le64toh(1)
8182 ;
8183 return 0;
8184}
8185
8186_ACEOF
8187if ac_fn_c_try_link "$LINENO"; then :
8188 ac_cv_has_le64toh=yes
8189else
8190 ac_cv_has_le64toh=no
8191fi
8192rm -f core conftest.err conftest.$ac_objext \
8193 conftest$ac_exeext conftest.$ac_ext
8194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8195$as_echo "$ac_cv_has_le64toh" >&6; }
8196if test "$ac_cv_has_le64toh" = "yes"; then
8197
8198$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8199
8200fi
8201
Martin v. Löwis399a6892002-10-04 10:22:02 +00008202# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8203# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8204# defined, but the compiler does not support pragma redefine_extname,
8205# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8206# structures (such as rlimit64) without declaring them. As a
8207# work-around, disable LFS on such configurations
8208
8209use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8211$as_echo_n "checking Solaris LFS bug... " >&6; }
8212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008213/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008214
8215#define _LARGEFILE_SOURCE 1
8216#define _FILE_OFFSET_BITS 64
8217#include <sys/resource.h>
8218
Martin v. Löwis399a6892002-10-04 10:22:02 +00008219int
8220main ()
8221{
8222struct rlimit foo;
8223 ;
8224 return 0;
8225}
8226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008228 sol_lfs_bug=no
8229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8234$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235if test "$sol_lfs_bug" = "yes"; then
8236 use_lfs=no
8237fi
8238
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008239# Don't use largefile support for GNU/Hurd
8240case $ac_sys_system in GNU*)
8241 use_lfs=no
8242esac
8243
Martin v. Löwis399a6892002-10-04 10:22:02 +00008244if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008245# Two defines needed to enable largefile support on various platforms
8246# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008247case $ac_sys_system/$ac_sys_release in
8248AIX*)
8249
8250$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8251
8252 ;;
8253esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008256
8257
Matthias Kloseb9621712010-04-24 17:59:49 +00008258$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008259
Martin v. Löwis399a6892002-10-04 10:22:02 +00008260fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008261
Guido van Rossum84e7b241996-08-19 21:59:00 +00008262# Add some code to confdefs.h so that the test for off_t works on SCO
8263cat >> confdefs.h <<\EOF
8264#if defined(SCO_DS)
8265#undef _OFF_T
8266#endif
8267EOF
8268
Guido van Rossumef2255b2000-03-10 22:30:29 +00008269# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008270ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008271if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008272
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008273else
Martin v. Löwis11437992002-04-12 09:54:03 +00008274
8275cat >>confdefs.h <<_ACEOF
8276#define mode_t int
8277_ACEOF
8278
8279fi
8280
Matthias Kloseb9621712010-04-24 17:59:49 +00008281ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008282if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008283
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008284else
Martin v. Löwis11437992002-04-12 09:54:03 +00008285
8286cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008288_ACEOF
8289
8290fi
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008294
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008295else
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
8297cat >>confdefs.h <<_ACEOF
8298#define pid_t int
8299_ACEOF
8300
8301fi
8302
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008305#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008307
Matthias Kloseb9621712010-04-24 17:59:49 +00008308ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008309if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008310
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008311else
Martin v. Löwis11437992002-04-12 09:54:03 +00008312
8313cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008315_ACEOF
8316
8317fi
8318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8320$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008321if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008323else
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008325/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008326#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008327
8328_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008331 ac_cv_type_uid_t=yes
8332else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008333 ac_cv_type_uid_t=no
8334fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008335rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008336
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8339$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008340if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008343
8344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008346
8347fi
8348
Mark Dickinson983bc162012-12-02 12:11:38 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008351if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008354
8355fi
8356
Stefan Krah1919b7e2012-03-21 18:25:23 +01008357ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8358if test "x$ac_cv_type___uint128_t" = xyes; then :
8359
8360$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8361
8362fi
8363
Jack Jansendd19cf82001-12-06 22:36:17 +00008364
Michael W. Hudson54241132001-12-07 15:38:26 +00008365# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008366# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367# The cast to long int works around a bug in the HP C Compiler
8368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8370# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8372$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008373if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008375else
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 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 +00008377
Martin v. Löwis11437992002-04-12 09:54:03 +00008378else
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 if test "$ac_cv_type_int" = yes; then
8380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008382as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008383See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384 else
8385 ac_cv_sizeof_int=0
8386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8391$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392
8393
8394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008396#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008397_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008398
8399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400# The cast to long int works around a bug in the HP C Compiler
8401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8403# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8405$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008406if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008408else
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 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 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411else
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 if test "$ac_cv_type_long" = yes; then
8413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008415as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008416See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 else
8418 ac_cv_sizeof_long=0
8419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8424$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425
8426
8427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008429#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008431
8432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433# The cast to long int works around a bug in the HP C Compiler
8434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8436# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8438$as_echo_n "checking size of long long... " >&6; }
8439if ${ac_cv_sizeof_long_long+:} false; then :
8440 $as_echo_n "(cached) " >&6
8441else
8442 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8443
8444else
8445 if test "$ac_cv_type_long_long" = yes; then
8446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8448as_fn_error 77 "cannot compute sizeof (long long)
8449See \`config.log' for more details" "$LINENO" 5; }
8450 else
8451 ac_cv_sizeof_long_long=0
8452 fi
8453fi
8454
8455fi
8456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8457$as_echo "$ac_cv_sizeof_long_long" >&6; }
8458
8459
8460
8461cat >>confdefs.h <<_ACEOF
8462#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8463_ACEOF
8464
8465
8466# The cast to long int works around a bug in the HP C Compiler
8467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8469# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8471$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008472if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008474else
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 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 +00008476
Martin v. Löwis11437992002-04-12 09:54:03 +00008477else
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 if test "$ac_cv_type_void_p" = yes; then
8479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008481as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008482See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483 else
8484 ac_cv_sizeof_void_p=0
8485 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8490$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491
8492
8493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008495#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008496_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008497
8498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499# The cast to long int works around a bug in the HP C Compiler
8500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8502# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8504$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008505if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008507else
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 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 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 if test "$ac_cv_type_short" = yes; then
8512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008514as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516 else
8517 ac_cv_sizeof_short=0
8518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8523$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008528#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008530
8531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532# The cast to long int works around a bug in the HP C Compiler
8533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8535# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8537$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008538if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008540else
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 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 +00008542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 if test "$ac_cv_type_float" = yes; then
8545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008547as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008548See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 else
8550 ac_cv_sizeof_float=0
8551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8556$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557
8558
8559
Martin v. Löwis11437992002-04-12 09:54:03 +00008560cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008561#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008562_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008563
8564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565# The cast to long int works around a bug in the HP C Compiler
8566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8568# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8570$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008571if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 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 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576else
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 if test "$ac_cv_type_double" = yes; then
8578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008580as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008581See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582 else
8583 ac_cv_sizeof_double=0
8584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8589$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008590
8591
8592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008594#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008595_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008596
8597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598# The cast to long int works around a bug in the HP C Compiler
8599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8603$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008604if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008606else
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 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 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 if test "$ac_cv_type_fpos_t" = yes; then
8611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008613as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008614See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 else
8616 ac_cv_sizeof_fpos_t=0
8617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8622$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623
8624
8625
Martin v. Löwis11437992002-04-12 09:54:03 +00008626cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008627#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008628_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008629
Michael W. Hudson54241132001-12-07 15:38:26 +00008630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631# The cast to long int works around a bug in the HP C Compiler
8632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8634# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8636$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008637if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 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 +00008641
Martin v. Löwis18e16552006-02-15 17:27:45 +00008642else
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 if test "$ac_cv_type_size_t" = yes; then
8644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008646as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008647See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648 else
8649 ac_cv_sizeof_size_t=0
8650 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652
Martin v. Löwis18e16552006-02-15 17:27:45 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8655$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656
8657
8658
Martin v. Löwis18e16552006-02-15 17:27:45 +00008659cat >>confdefs.h <<_ACEOF
8660#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8661_ACEOF
8662
8663
Christian Heimes400adb02008-02-01 08:12:03 +00008664# The cast to long int works around a bug in the HP C Compiler
8665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8667# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8669$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008670if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008672else
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 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 +00008674
Christian Heimes400adb02008-02-01 08:12:03 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 if test "$ac_cv_type_pid_t" = yes; then
8677 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008679as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008680See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008681 else
8682 ac_cv_sizeof_pid_t=0
8683 fi
8684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685
Christian Heimes400adb02008-02-01 08:12:03 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8688$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008689
8690
8691
8692cat >>confdefs.h <<_ACEOF
8693#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8694_ACEOF
8695
8696
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008697# The cast to long int works around a bug in the HP C Compiler
8698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8700# This bug is HP SR number 8606223364.
8701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8702$as_echo_n "checking size of uintptr_t... " >&6; }
8703if ${ac_cv_sizeof_uintptr_t+:} false; then :
8704 $as_echo_n "(cached) " >&6
8705else
8706 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8707
8708else
8709 if test "$ac_cv_type_uintptr_t" = yes; then
8710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8712as_fn_error 77 "cannot compute sizeof (uintptr_t)
8713See \`config.log' for more details" "$LINENO" 5; }
8714 else
8715 ac_cv_sizeof_uintptr_t=0
8716 fi
8717fi
8718
8719fi
8720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8721$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8722
8723
8724
8725cat >>confdefs.h <<_ACEOF
8726#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8727_ACEOF
8728
8729
Michael W. Hudson54241132001-12-07 15:38:26 +00008730
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8732$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008733have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008735/* end confdefs.h. */
8736
8737int
8738main ()
8739{
8740long double x; x = (long double)0;
8741 ;
8742 return 0;
8743}
8744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008745if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746
8747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749
8750 have_long_double=yes
8751
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008752fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8755$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008757# The cast to long int works around a bug in the HP C Compiler
8758# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8759# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8760# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8762$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008763if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 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 +00008767
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 if test "$ac_cv_type_long_double" = yes; then
8770 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008772as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008773See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008774 else
8775 ac_cv_sizeof_long_double=0
8776 fi
8777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8781$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782
8783
8784
8785cat >>confdefs.h <<_ACEOF
8786#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8787_ACEOF
8788
8789
8790fi
8791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792# The cast to long int works around a bug in the HP C Compiler
8793# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8794# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8795# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8797$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008798if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 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 +00008802
Thomas Woutersb2137042007-02-01 18:02:27 +00008803else
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 if test "$ac_cv_type__Bool" = yes; then
8805 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008807as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008808See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809 else
8810 ac_cv_sizeof__Bool=0
8811 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008813
Thomas Woutersb2137042007-02-01 18:02:27 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8816$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817
8818
8819
Thomas Woutersb2137042007-02-01 18:02:27 +00008820cat >>confdefs.h <<_ACEOF
8821#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8822_ACEOF
8823
8824
Thomas Woutersb2137042007-02-01 18:02:27 +00008825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826# The cast to long int works around a bug in the HP C Compiler
8827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8829# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8831$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008832if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008834else
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836#ifdef HAVE_SYS_TYPES_H
8837#include <sys/types.h>
8838#endif
8839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 if test "$ac_cv_type_off_t" = yes; then
8844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008846as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008847See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848 else
8849 ac_cv_sizeof_off_t=0
8850 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8855$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857
8858
Martin v. Löwis11437992002-04-12 09:54:03 +00008859cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008860#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008861_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008862
Michael W. Hudson54241132001-12-07 15:38:26 +00008863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8866$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008867if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008868 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008871
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8873$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008877fi
8878
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008879# The cast to long int works around a bug in the HP C Compiler
8880# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8881# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8882# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8884$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008885if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008887else
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889#ifdef HAVE_SYS_TYPES_H
8890#include <sys/types.h>
8891#endif
8892#ifdef HAVE_TIME_H
8893#include <time.h>
8894#endif
8895
Matthias Kloseb9621712010-04-24 17:59:49 +00008896"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if test "$ac_cv_type_time_t" = yes; then
8900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008902as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008903See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904 else
8905 ac_cv_sizeof_time_t=0
8906 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8911$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008913
8914
Martin v. Löwis11437992002-04-12 09:54:03 +00008915cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008916#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008917_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008918
Michael W. Hudson54241132001-12-07 15:38:26 +00008919
8920
Trent Mick635f6fb2000-08-23 21:33:05 +00008921# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008922ac_save_cc="$CC"
8923if test "$ac_cv_kpthread" = "yes"
8924then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008925elif test "$ac_cv_kthread" = "yes"
8926then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008927elif test "$ac_cv_pthread" = "yes"
8928then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008929fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8932$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008933have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
8937 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008938int
8939main ()
8940{
Guido van Rossum12580492000-09-24 16:47:19 +00008941pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ;
8943 return 0;
8944}
Matthias Kloseb159a552010-04-25 21:00:44 +00008945
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008947if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008948 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8952$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008953if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8957# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8959$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008960if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964#ifdef HAVE_PTHREAD_H
8965#include <pthread.h>
8966#endif
8967
Matthias Kloseb9621712010-04-24 17:59:49 +00008968"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 if test "$ac_cv_type_pthread_t" = yes; then
8972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008974as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008975See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976 else
8977 ac_cv_sizeof_pthread_t=0
8978 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980
Trent Mick635f6fb2000-08-23 21:33:05 +00008981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8983$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008984
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985
8986
Martin v. Löwis11437992002-04-12 09:54:03 +00008987cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008988#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008989_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991
Trent Mick635f6fb2000-08-23 21:33:05 +00008992fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008993CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008994
Michael W. Hudson54241132001-12-07 15:38:26 +00008995
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008996case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008997 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008998 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8999 ;;
9000 Darwin/*)
9001 OTHER_LIBTOOL_OPT=""
9002 ;;
9003esac
9004
9005
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009006
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009007case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009008 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009009 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9010 if test "${enable_universalsdk}"; then
9011 :
9012 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009013 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009014 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009015 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009016 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009017 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009018 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009019 if test ${gcc_version} '<' 4.0
9020 then
9021 LIBTOOL_CRUFT="-lcc_dynamic"
9022 else
9023 LIBTOOL_CRUFT=""
9024 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009026 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009029/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009030
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009031 #include <unistd.h>
9032 int main(int argc, char*argv[])
9033 {
9034 if (sizeof(long) == 4) {
9035 return 0;
9036 } else {
9037 return 1;
9038 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009039 }
9040
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009042if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 ac_osx_32bit=yes
9044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009049fi
9050
9051
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009053 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009054 i386)
9055 MACOSX_DEFAULT_ARCH="i386"
9056 ;;
9057 ppc)
9058 MACOSX_DEFAULT_ARCH="ppc"
9059 ;;
9060 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009061 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009062 ;;
9063 esac
9064 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009065 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009066 i386)
9067 MACOSX_DEFAULT_ARCH="x86_64"
9068 ;;
9069 ppc)
9070 MACOSX_DEFAULT_ARCH="ppc64"
9071 ;;
9072 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009073 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074 ;;
9075 esac
9076
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009077 fi
9078
9079 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009081 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009082esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9084$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009085if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009086then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009087 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009089 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009092
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9094$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009095 if test $enable_shared = "yes"
9096 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009097 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 +00009098 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099else
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9101$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009102fi
9103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9105$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009106case $ac_sys_system/$ac_sys_release in
9107 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009108
Matthias Kloseb9621712010-04-24 17:59:49 +00009109$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009110
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9112$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009113 ;;
9114 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009117 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009118esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009119
Guido van Rossum0a516c91994-09-12 10:58:40 +00009120# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009121
Michael W. Hudson54241132001-12-07 15:38:26 +00009122
9123
9124
9125
Benjamin Peterson99f03762010-04-11 22:15:28 +00009126
Thomas Wouters477c8d52006-05-27 19:21:47 +00009127
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009128# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9129# -- usually .so, .sl on HP-UX, .dll on Cygwin
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9131$as_echo_n "checking the extension of shared libraries... " >&6; }
9132if test -z "$SHLIB_SUFFIX"; then
9133 case $ac_sys_system in
9134 hp*|HP*)
9135 case `uname -m` in
9136 ia64) SHLIB_SUFFIX=.so;;
9137 *) SHLIB_SUFFIX=.sl;;
9138 esac
9139 ;;
9140 CYGWIN*) SHLIB_SUFFIX=.dll;;
9141 *) SHLIB_SUFFIX=.so;;
9142 esac
9143fi
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9145$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009146
Guido van Rossum0a516c91994-09-12 10:58:40 +00009147# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009148# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009149# (Shared libraries in this instance are shared modules to be loaded into
9150# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9152$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009153if test -z "$LDSHARED"
9154then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009155 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009156 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009157 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009158 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009159 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009160 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009161 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009163 if test "$GCC" = "yes" ; then
9164 LDSHARED='$(CC) -shared'
9165 LDCXXSHARED='$(CXX) -shared'
9166 else
9167 LDSHARED='$(CC) -G'
9168 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009169 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009170 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 if test "$GCC" = "yes" ; then
9172 LDSHARED='$(CC) -shared'
9173 LDCXXSHARED='$(CXX) -shared'
9174 else
9175 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009176 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009177 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009178 LDSHARED='$(CC) -bundle'
9179 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009180 if test "$enable_framework" ; then
9181 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009182 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9183 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009185 else
9186 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009187 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009189 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009190 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009191 LDSHARED='$(CC) -bundle'
9192 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009193 if test "$enable_framework" ; then
9194 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009195 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9196 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009197 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009198 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009199 # No framework, use the Python app as bundle-loader
9200 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009201 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009202 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009203 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009204 Darwin/*)
9205 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9206 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009207
Ned Deily36820b62014-06-25 13:44:22 -07009208 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9209 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9210 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9211 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9212 if test ${dep_target_major} -eq 10 && \
9213 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009214 then
Ned Deily36820b62014-06-25 13:44:22 -07009215 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009216 LDSHARED='$(CC) -bundle'
9217 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009218 if test "$enable_framework" ; then
9219 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009220 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9221 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009222 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009223 else
9224 # No framework, use the Python app as bundle-loader
9225 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9226 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009228 fi
Ned Deily36820b62014-06-25 13:44:22 -07009229 else
9230 # building for OS X 10.3 and later
9231 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9232 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9233 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009234 fi
9235 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 Linux*|GNU*|QNX*)
9237 LDSHARED='$(CC) -shared'
9238 LDCXXSHARED='$(CXX) -shared';;
9239 BSD/OS*/4*)
9240 LDSHARED="gcc -shared"
9241 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009242 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009243 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009244 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009245 LDSHARED='$(CC) -shared'
9246 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009247 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009248 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009249 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009250 OpenBSD*)
9251 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9252 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009253 LDSHARED='$(CC) -shared $(CCSHARED)'
9254 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009255 else
9256 case `uname -r` in
9257 [01].* | 2.[0-7] | 2.[0-7].*)
9258 LDSHARED="ld -Bshareable ${LDFLAGS}"
9259 ;;
9260 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009261 LDSHARED='$(CC) -shared $(CCSHARED)'
9262 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009263 ;;
9264 esac
9265 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009266 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009267 LDSHARED='$(CC) -shared'
9268 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009269 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270 if test "$GCC" = "yes" ; then
9271 LDSHARED='$(CC) -shared'
9272 LDCXXSHARED='$(CXX) -shared'
9273 else
9274 LDSHARED='$(CC) -G'
9275 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009276 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009277 SCO_SV*)
9278 LDSHARED='$(CC) -Wl,-G,-Bexport'
9279 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9280 CYGWIN*)
9281 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9282 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009283 *) LDSHARED="ld";;
9284 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9287$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009288LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009289BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009290# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9293$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009294if test -z "$CCSHARED"
9295then
Guido van Rossum07397971997-04-29 21:49:50 +00009296 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009297 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009298 then CCSHARED="-fPIC";
9299 elif test `uname -p` = sparc;
9300 then CCSHARED="-xcode=pic32";
9301 else CCSHARED="-Kpic";
9302 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009303 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009304 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009305 else CCSHARED="+z";
9306 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009307 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009308 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009309 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009310 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009311 if test "$GCC" = "yes"
9312 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009313 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009314 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009315 SCO_SV*)
9316 if test "$GCC" = "yes"
9317 then CCSHARED="-fPIC"
9318 else CCSHARED="-Kpic -belf"
9319 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009320 IRIX*/6*) case $CC in
9321 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009322 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009323 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9327$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009329# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9331$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332if test -z "$LINKFORSHARED"
9333then
Guido van Rossum07397971997-04-29 21:49:50 +00009334 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009335 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009336 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009337 LINKFORSHARED="-Wl,-E -Wl,+s";;
9338# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009339 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009340 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009341 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009343 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009344
9345 # Issue #18075: the default maximum stack size (8MBytes) is too
9346 # small for the default recursion limit. Increase the stack size
9347 # to ensure that tests don't crash
9348 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9349
Jack Jansene578a632001-08-15 01:27:14 +00009350 if test "$enable_framework"
9351 then
Jack Jansenda49e192005-01-07 13:08:22 +00009352 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009353 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009354 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009355 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009356 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009357 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009358 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009359 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9360 then
9361 LINKFORSHARED="-Wl,--export-dynamic"
9362 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009363 SunOS/5*) case $CC in
9364 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009365 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009366 then
9367 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009368 fi;;
9369 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009370 CYGWIN*)
9371 if test $enable_shared = "no"
9372 then
9373 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9374 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009375 QNX*)
9376 # -Wl,-E causes the symbols to be added to the dynamic
9377 # symbol table so that they can be found when a module
9378 # is loaded. -N 2048K causes the stack size to be set
9379 # to 2048 kilobytes so that the stack doesn't overflow
9380 # when running test_compile.py.
9381 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009382 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9385$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009386
Michael W. Hudson54241132001-12-07 15:38:26 +00009387
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9390$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009391if test ! "$LIBRARY" = "$LDLIBRARY"
9392then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009393 case $ac_sys_system in
9394 CYGWIN*)
9395 # Cygwin needs CCSHARED when building extension DLLs
9396 # but not when building the interpreter DLL.
9397 CFLAGSFORSHARED='';;
9398 *)
9399 CFLAGSFORSHARED='$(CCSHARED)'
9400 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9403$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009404
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009405# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9406# library (with --enable-shared).
9407# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009408# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9409# if it is not required, since it creates a dependency of the shared library
9410# to LIBS. This, in turn, means that applications linking the shared libpython
9411# don't need to link LIBS explicitly. The default should be only changed
9412# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9415$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009416case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009417 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009418 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009419esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9421$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009422
9423
Guido van Rossum627b2d71993-12-24 10:39:16 +00009424# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9426$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009427if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009428 $as_echo_n "(cached) " >&6
9429else
9430 ac_check_lib_save_LIBS=$LIBS
9431LIBS="-lsendfile $LIBS"
9432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9433/* end confdefs.h. */
9434
9435/* Override any GCC internal prototype to avoid an error.
9436 Use char because int might match the return type of a GCC
9437 builtin and then its argument prototype would still apply. */
9438#ifdef __cplusplus
9439extern "C"
9440#endif
9441char sendfile ();
9442int
9443main ()
9444{
9445return sendfile ();
9446 ;
9447 return 0;
9448}
9449_ACEOF
9450if ac_fn_c_try_link "$LINENO"; then :
9451 ac_cv_lib_sendfile_sendfile=yes
9452else
9453 ac_cv_lib_sendfile_sendfile=no
9454fi
9455rm -f core conftest.err conftest.$ac_objext \
9456 conftest$ac_exeext conftest.$ac_ext
9457LIBS=$ac_check_lib_save_LIBS
9458fi
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9460$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009461if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009462 cat >>confdefs.h <<_ACEOF
9463#define HAVE_LIBSENDFILE 1
9464_ACEOF
9465
9466 LIBS="-lsendfile $LIBS"
9467
9468fi
9469
Matthias Kloseb9621712010-04-24 17:59:49 +00009470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9471$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009472if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009473 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474else
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009476LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480/* Override any GCC internal prototype to avoid an error.
9481 Use char because int might match the return type of a GCC
9482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009483#ifdef __cplusplus
9484extern "C"
9485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009486char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009487int
9488main ()
9489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009500rm -f core conftest.err conftest.$ac_objext \
9501 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009502LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9505$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009506if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 cat >>confdefs.h <<_ACEOF
9508#define HAVE_LIBDL 1
9509_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009510
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009511 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009512
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009513fi
9514 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9516$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009517if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009518 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519else
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009521LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525/* Override any GCC internal prototype to avoid an error.
9526 Use char because int might match the return type of a GCC
9527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009528#ifdef __cplusplus
9529extern "C"
9530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009531char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009532int
9533main ()
9534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 ;
9537 return 0;
9538}
9539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009540if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009542else
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009545rm -f core conftest.err conftest.$ac_objext \
9546 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009547LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9550$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009551if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 cat >>confdefs.h <<_ACEOF
9553#define HAVE_LIBDLD 1
9554_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009555
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009556 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009558fi
9559 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009560
Georg Brandlb1441c72009-01-03 22:33:39 +00009561# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009562if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9564$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009565if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009567else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009568 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572/* Override any GCC internal prototype to avoid an error.
9573 Use char because int might match the return type of a GCC
9574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009575#ifdef __cplusplus
9576extern "C"
9577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009578char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009579int
9580main ()
9581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 ;
9584 return 0;
9585}
9586_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587for ac_lib in '' pthread rt posix4; do
9588 if test -z "$ac_lib"; then
9589 ac_res="none required"
9590 else
9591 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009592 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009597rm -f core conftest.err conftest.$ac_objext \
9598 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009599 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602done
Victor Stinnere0be4232011-10-25 13:06:09 +02009603if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605else
9606 ac_cv_search_sem_init=no
9607fi
9608rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009609LIBS=$ac_func_search_save_LIBS
9610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9612$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009614if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009616
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009617fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009618 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009619 # posix4 on Solaris 2.6
9620 # pthread (first!) on Linux
9621fi
9622
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9625$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009628else
9629 ac_check_lib_save_LIBS=$LIBS
9630LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009632/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634/* Override any GCC internal prototype to avoid an error.
9635 Use char because int might match the return type of a GCC
9636 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009637#ifdef __cplusplus
9638extern "C"
9639#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009640char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009641int
9642main ()
9643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009645 ;
9646 return 0;
9647}
9648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009650 ac_cv_lib_intl_textdomain=yes
9651else
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654rm -f core conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656LIBS=$ac_check_lib_save_LIBS
9657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9659$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009660if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663
Brett Cannonc6d936e2009-06-07 20:09:53 +00009664 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009665fi
9666
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009667
9668# checks for system dependent C++ extensions support
9669case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9671$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009673/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009674
Georg Brandl59e87bd2011-02-15 19:48:59 +00009675 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009676int
9677main ()
9678{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ;
9681 return 0;
9682}
Matthias Kloseb159a552010-04-25 21:00:44 +00009683
Martin v. Löwis11437992002-04-12 09:54:03 +00009684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009685if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009686
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009689
Matthias Kloseb159a552010-04-25 21:00:44 +00009690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009691$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009692
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009693else
Matthias Kloseb159a552010-04-25 21:00:44 +00009694
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009697
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009699rm -f core conftest.err conftest.$ac_objext \
9700 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009701 *) ;;
9702esac
9703
Christian Heimes985ecdc2013-11-20 11:46:18 +01009704# check for systems that require aligned memory access
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9706$as_echo_n "checking aligned memory access is required... " >&6; }
9707if test "$cross_compiling" = yes; then :
9708 aligned_required=yes
9709else
9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9711/* end confdefs.h. */
9712
9713int main()
9714{
9715 char s[16];
9716 int i, *p1, *p2;
9717 for (i=0; i < 16; i++)
9718 s[i] = i;
9719 p1 = (int*)(s+1);
9720 p2 = (int*)(s+2);
9721 if (*p1 == *p2)
9722 return 1;
9723 return 0;
9724}
9725
9726_ACEOF
9727if ac_fn_c_try_run "$LINENO"; then :
9728 aligned_required=no
9729else
9730 aligned_required=yes
9731fi
9732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9733 conftest.$ac_objext conftest.beam conftest.$ac_ext
9734fi
9735
9736
9737if test "$aligned_required" = yes ; then
9738
9739$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9740
9741fi
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9743$as_echo "$aligned_required" >&6; }
9744
9745
9746# str, bytes and memoryview hash algorithm
9747
9748
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9750$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9751
9752# Check whether --with-hash_algorithm was given.
9753if test "${with_hash_algorithm+set}" = set; then :
9754 withval=$with_hash_algorithm;
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9756$as_echo "$withval" >&6; }
9757case "$withval" in
9758 siphash24)
9759 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9760
9761 ;;
9762 fnv)
9763 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9764
9765 ;;
9766 *)
9767 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9768 ;;
9769esac
9770
9771else
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9773$as_echo "default" >&6; }
9774fi
9775
9776
Charles-François Natalid30b0222014-05-08 23:08:51 +01009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9778$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9779
9780# Check whether --with-address_sanitizer was given.
9781if test "${with_address_sanitizer+set}" = set; then :
9782 withval=$with_address_sanitizer;
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9784$as_echo "$withval" >&6; }
9785BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9786LDFLAGS="-fsanitize=address $LDFLAGS"
9787
9788else
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793
Guido van Rossum70c7f481998-03-26 18:44:10 +00009794# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9796$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009797if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009799else
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009801LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805/* Override any GCC internal prototype to avoid an error.
9806 Use char because int might match the return type of a GCC
9807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808#ifdef __cplusplus
9809extern "C"
9810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009811char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825rm -f core conftest.err conftest.$ac_objext \
9826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9830$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009832 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009833fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009834 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9836$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009837if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009841LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845/* Override any GCC internal prototype to avoid an error.
9846 Use char because int might match the return type of a GCC
9847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009848#ifdef __cplusplus
9849extern "C"
9850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009851char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009852int
9853main ()
9854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ;
9857 return 0;
9858}
9859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865rm -f core conftest.err conftest.$ac_objext \
9866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009867LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9870$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009872 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009873fi
9874 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9877$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009880if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9883$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009884LIBS="$withval $LIBS"
9885
9886else
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889fi
9890
Guido van Rossum7f43da71994-08-01 12:15:30 +00009891
Victor Stinner8291b5e2015-03-20 16:03:14 +01009892
9893
9894
9895
9896
9897
9898
9899if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9900 if test -n "$ac_tool_prefix"; then
9901 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9902set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904$as_echo_n "checking for $ac_word... " >&6; }
9905if ${ac_cv_path_PKG_CONFIG+:} false; then :
9906 $as_echo_n "(cached) " >&6
9907else
9908 case $PKG_CONFIG in
9909 [\\/]* | ?:[\\/]*)
9910 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9911 ;;
9912 *)
9913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914for as_dir in $PATH
9915do
9916 IFS=$as_save_IFS
9917 test -z "$as_dir" && as_dir=.
9918 for ac_exec_ext in '' $ac_executable_extensions; do
9919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922 break 2
9923 fi
9924done
9925 done
9926IFS=$as_save_IFS
9927
9928 ;;
9929esac
9930fi
9931PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9932if test -n "$PKG_CONFIG"; then
9933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9934$as_echo "$PKG_CONFIG" >&6; }
9935else
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
9938fi
9939
9940
9941fi
9942if test -z "$ac_cv_path_PKG_CONFIG"; then
9943 ac_pt_PKG_CONFIG=$PKG_CONFIG
9944 # Extract the first word of "pkg-config", so it can be a program name with args.
9945set dummy pkg-config; ac_word=$2
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947$as_echo_n "checking for $ac_word... " >&6; }
9948if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9949 $as_echo_n "(cached) " >&6
9950else
9951 case $ac_pt_PKG_CONFIG in
9952 [\\/]* | ?:[\\/]*)
9953 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9954 ;;
9955 *)
9956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957for as_dir in $PATH
9958do
9959 IFS=$as_save_IFS
9960 test -z "$as_dir" && as_dir=.
9961 for ac_exec_ext in '' $ac_executable_extensions; do
9962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9963 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965 break 2
9966 fi
9967done
9968 done
9969IFS=$as_save_IFS
9970
9971 ;;
9972esac
9973fi
9974ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9975if test -n "$ac_pt_PKG_CONFIG"; then
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9977$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9978else
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
9981fi
9982
9983 if test "x$ac_pt_PKG_CONFIG" = x; then
9984 PKG_CONFIG=""
9985 else
9986 case $cross_compiling:$ac_tool_warned in
9987yes:)
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9990ac_tool_warned=yes ;;
9991esac
9992 PKG_CONFIG=$ac_pt_PKG_CONFIG
9993 fi
9994else
9995 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9996fi
9997
9998fi
9999if test -n "$PKG_CONFIG"; then
10000 _pkg_min_version=0.9.0
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10002$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10003 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10005$as_echo "yes" >&6; }
10006 else
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009 PKG_CONFIG=""
10010 fi
10011fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012
10013# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10015$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010016
10017# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010019 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010020else
10021 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010022fi
10023
10024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10026$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027
10028# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10030$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010031
10032# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010033if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010034 withval=$with_system_ffi;
10035fi
10036
10037
Zachary Ware935043d2016-09-09 17:01:21 -070010038case "$with_system_ffi" in
10039 "")
10040 case $ac_sys_system in
10041 Darwin)
10042 with_system_ffi="no"
10043 ;;
10044 *)
10045 with_system_ffi="yes"
10046 ;;
10047 esac
10048 ;;
10049 yes|no)
10050 ;;
10051 *)
10052 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10053 ;;
10054esac
10055
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010057 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10058else
10059 LIBFFI_INCLUDEDIR=""
10060fi
10061
10062
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10064$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010065
Stefan Krah60187b52012-03-23 19:06:27 +010010066# Check for use of the system libmpdec library
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10068$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10069
10070# Check whether --with-system_libmpdec was given.
10071if test "${with_system_libmpdec+set}" = set; then :
10072 withval=$with_system_libmpdec;
10073else
10074 with_system_libmpdec="no"
10075fi
10076
10077
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10079$as_echo "$with_system_libmpdec" >&6; }
10080
Benjamin Peterson076ed002010-10-31 17:11:02 +000010081# Check for support for loadable sqlite extensions
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10083$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10084# Check whether --enable-loadable-sqlite-extensions was given.
10085if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10086 enableval=$enable_loadable_sqlite_extensions;
10087else
10088 enable_loadable_sqlite_extensions="no"
10089fi
10090
10091
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10093$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10094
Ned Deilyd819b932013-09-06 01:07:05 -070010095# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10096
10097
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10099$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10100
10101# Check whether --with-tcltk-includes was given.
10102if test "${with_tcltk_includes+set}" = set; then :
10103 withval=$with_tcltk_includes;
10104else
10105 with_tcltk_includes="default"
10106fi
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10109$as_echo "$with_tcltk_includes" >&6; }
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10111$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10112
10113# Check whether --with-tcltk-libs was given.
10114if test "${with_tcltk_libs+set}" = set; then :
10115 withval=$with_tcltk_libs;
10116else
10117 with_tcltk_libs="default"
10118fi
10119
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10121$as_echo "$with_tcltk_libs" >&6; }
10122if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10123then
10124 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10125 then
10126 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10127 fi
10128 TCLTK_INCLUDES=""
10129 TCLTK_LIBS=""
10130else
10131 TCLTK_INCLUDES="$with_tcltk_includes"
10132 TCLTK_LIBS="$with_tcltk_libs"
10133fi
10134
Matthias Klose55708cc2009-04-30 08:06:49 +000010135# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10137$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010138
10139# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010141 withval=$with_dbmliborder;
10142if test x$with_dbmliborder = xyes
10143then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010144as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010145else
10146 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10147 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10148 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010149 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010150 fi
10151 done
10152fi
10153fi
10154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10156$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010157
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010158# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010159
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010160USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
10164# Templates for things AC_DEFINEd more than once.
10165# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010166
10167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10170$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010173if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 withval=$with_threads;
10175fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010176
10177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010178# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 withval=$with_thread; with_threads=$with_thread
10183fi
10184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010185
10186if test -z "$with_threads"
10187then with_threads="yes"
10188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10190$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010191
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010192
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010193if test "$with_threads" = "no"
10194then
10195 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196elif test "$ac_cv_pthread_is_default" = yes
10197then
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010200 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202
10203 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010205elif test "$ac_cv_kpthread" = "yes"
10206then
10207 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010208 if test "$ac_cv_cxx_thread" = "yes"; then
10209 CXX="$CXX -Kpthread"
10210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010212
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010213 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010214 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215elif test "$ac_cv_kthread" = "yes"
10216then
10217 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010218 if test "$ac_cv_cxx_thread" = "yes"; then
10219 CXX="$CXX -Kthread"
10220 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010222
10223 posix_threads=yes
10224 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225elif test "$ac_cv_pthread" = "yes"
10226then
10227 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010228 if test "$ac_cv_cxx_thread" = "yes"; then
10229 CXX="$CXX -pthread"
10230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010232
10233 posix_threads=yes
10234 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235else
10236 if test ! -z "$with_threads" -a -d "$with_threads"
10237 then LDFLAGS="$LDFLAGS -L$with_threads"
10238 fi
10239 if test ! -z "$withval" -a -d "$withval"
10240 then LDFLAGS="$LDFLAGS -L$withval"
10241 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242
10243 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010244 # define _POSIX_THREADS in unistd.h. Some apparently don't
10245 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10247$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010249/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010250
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010252#ifdef _POSIX_THREADS
10253yes
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
10256_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010259 unistd_defines_pthreads=yes
10260else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261 unistd_defines_pthreads=no
10262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010263rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10266$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010267
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010269
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010270 # Just looking for pthread_create in libpthread is not enough:
10271 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10272 # So we really have to include pthread.h, and then link.
10273 _libs=$LIBS
10274 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10276$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010279
10280#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010281#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010282
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
10286{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010287
10288pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10296$as_echo "yes" >&6; }
10297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010298
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010299 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010300 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010301else
Martin v. Löwis11437992002-04-12 09:54:03 +000010302
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010303 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010305if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010307
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010308 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010309 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010310else
Guido van Rossumad678af1998-10-02 14:42:15 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10313$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010314if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010318LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322/* Override any GCC internal prototype to avoid an error.
10323 Use char because int might match the return type of a GCC
10324 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010325#ifdef __cplusplus
10326extern "C"
10327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010328char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010329int
10330main ()
10331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ;
10334 return 0;
10335}
10336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010339else
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010342rm -f core conftest.err conftest.$ac_objext \
10343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010344LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10347$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010348if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010350
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010352 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010353 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010354else
Greg Steinadf63d62000-07-05 10:38:09 +000010355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10357$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010360else
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010362LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366/* Override any GCC internal prototype to avoid an error.
10367 Use char because int might match the return type of a GCC
10368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010369#ifdef __cplusplus
10370extern "C"
10371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010372char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010373int
10374main ()
10375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ;
10378 return 0;
10379}
10380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010383else
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386rm -f core conftest.err conftest.$ac_objext \
10387 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010388LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10391$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010392if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010395 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010396 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010397 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010398else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10401$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010402if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404else
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410/* Override any GCC internal prototype to avoid an error.
10411 Use char because int might match the return type of a GCC
10412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#ifdef __cplusplus
10414extern "C"
10415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010416char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010417int
10418main ()
10419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 ;
10422 return 0;
10423}
10424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430rm -f core conftest.err conftest.$ac_objext \
10431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010432LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10435$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010436if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010439 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010440 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010441 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10445$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010446if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010448else
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454/* Override any GCC internal prototype to avoid an error.
10455 Use char because int might match the return type of a GCC
10456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010457#ifdef __cplusplus
10458extern "C"
10459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010460char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461int
10462main ()
10463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010471else
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010476LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10479$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010483 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010484 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010485 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010486else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010487
Martin v. Löwis130fb172001-07-19 11:00:41 +000010488 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010489fi
10490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010492fi
10493
Guido van Rossum0be3e491997-05-22 20:33:33 +000010494fi
10495
Guido van Rossum49545951997-12-02 19:28:29 +000010496fi
10497
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498fi
10499
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010501rm -f core conftest.err conftest.$ac_objext \
10502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10505$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010506if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010508else
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010510LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514/* Override any GCC internal prototype to avoid an error.
10515 Use char because int might match the return type of a GCC
10516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010517#ifdef __cplusplus
10518extern "C"
10519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010520char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010521int
10522main ()
10523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 ;
10526 return 0;
10527}
10528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534rm -f core conftest.err conftest.$ac_objext \
10535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010536LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10539$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010540if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010544 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546fi
10547
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010548
Neal Norwitza978ab02002-11-02 16:58:05 +000010549 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10551$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010552if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010556LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560/* Override any GCC internal prototype to avoid an error.
10561 Use char because int might match the return type of a GCC
10562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010563#ifdef __cplusplus
10564extern "C"
10565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010566char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010567int
10568main ()
10569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ;
10572 return 0;
10573}
10574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010580rm -f core conftest.err conftest.$ac_objext \
10581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010582LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10585$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010586if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010588
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010589 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010590 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010591 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
10593
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010594 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010596
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597if test "$posix_threads" = "yes"; then
10598 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601
10602 fi
10603
10604 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10605 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010606 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609 ;;
10610 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612
10613 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010614 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010615$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010616
10617 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618 esac
10619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10621$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010622 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626 ac_cv_pthread_system_supported=no
10627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010630
10631 #include <stdio.h>
10632 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633 void *foo(void *parm) {
10634 return NULL;
10635 }
10636 main() {
10637 pthread_attr_t attr;
10638 pthread_t id;
10639 if (pthread_attr_init(&attr)) exit(-1);
10640 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10641 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10642 exit(0);
10643 }
10644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646 ac_cv_pthread_system_supported=yes
10647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655fi
10656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10658$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659 if test "$ac_cv_pthread_system_supported" = "yes"; then
10660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662
10663 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 for ac_func in pthread_sigmask
10665do :
10666 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010667if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010671 case $ac_sys_system in
10672 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010675
10676 ;;
10677 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678fi
10679done
10680
Christian Heimesf77b4b22013-08-21 13:26:05 +020010681 for ac_func in pthread_atfork
10682do :
10683 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10684if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10685 cat >>confdefs.h <<_ACEOF
10686#define HAVE_PTHREAD_ATFORK 1
10687_ACEOF
10688
10689fi
10690done
10691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692fi
10693
10694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10698$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705 ipv6=no
10706 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10708$as_echo "yes" >&6; }
10709 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710
10711 ipv6=yes
10712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714else
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 /* AF_INET6 available check */
10719#include <sys/types.h>
10720#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010721int
10722main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010724int domain = AF_INET6;
10725 ;
10726 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727}
Martin v. Löwis11437992002-04-12 09:54:03 +000010728_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010729if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10732$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735else
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10746$as_echo_n "checking if RFC2553 API is available... " >&6; }
10747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010749
10750 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010752int
10753main ()
10754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010755struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010756 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 ;
10758 return 0;
10759}
Matthias Kloseb159a552010-04-25 21:00:44 +000010760
Martin v. Löwis11437992002-04-12 09:54:03 +000010761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010766 ipv6=yes
10767
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010768else
Matthias Kloseb159a552010-04-25 21:00:44 +000010769
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010771$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010772 ipv6=no
10773
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776fi
10777
10778if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780
10781fi
10782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783fi
10784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785
10786ipv6type=unknown
10787ipv6lib=none
10788ipv6trylibc=no
10789
10790if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10792$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010793 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10794 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 case $i in
10796 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <netinet/in.h>
10801#ifdef IPV6_INRIA_VERSION
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010807 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010809rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810
10811 ;;
10812 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816#include <netinet/in.h>
10817#ifdef __KAME__
10818yes
10819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823 ipv6type=$i;
10824 ipv6lib=inet6
10825 ipv6libdir=/usr/local/v6/lib
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010828rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829
10830 ;;
10831 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835#include <features.h>
10836#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10837yes
10838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i;
10843 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010845rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846
10847 ;;
10848 linux-inet6)
10849 if test -d /usr/inet6; then
10850 ipv6type=$i
10851 ipv6lib=inet6
10852 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010853 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854 fi
10855 ;;
10856 solaris)
10857 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010858 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859 ipv6type=$i
10860 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 fi
10862 fi
10863 ;;
10864 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868#include <sys/param.h>
10869#ifdef _TOSHIBA_INET6
10870yes
10871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010872_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 ipv6type=$i;
10876 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010877 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010879rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880
10881 ;;
10882 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886#include </usr/local/v6/include/sys/v6config.h>
10887#ifdef __V6D__
10888yes
10889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893 ipv6type=$i;
10894 ipv6lib=v6;
10895 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010896 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010898rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899
10900 ;;
10901 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905#include <sys/param.h>
10906#ifdef _ZETA_MINAMI_INET6
10907yes
10908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010909_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912 ipv6type=$i;
10913 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010914 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917
10918 ;;
10919 esac
10920 if test "$ipv6type" != "unknown"; then
10921 break
10922 fi
10923 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10925$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926fi
10927
10928if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10929 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10930 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10931 echo "using lib$ipv6lib"
10932 else
10933 if test $ipv6trylibc = "yes"; then
10934 echo "using libc"
10935 else
10936 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10937 echo "You need to fetch lib$ipv6lib.a from appropriate"
10938 echo 'ipv6 kit and compile beforehand.'
10939 exit 1
10940 fi
10941 fi
10942fi
10943
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10945$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947/* end confdefs.h. */
10948 /* CAN_RAW_FD_FRAMES available check */
10949#include <linux/can/raw.h>
10950int
10951main ()
10952{
10953int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10954 ;
10955 return 0;
10956}
10957_ACEOF
10958if ac_fn_c_try_compile "$LINENO"; then :
10959
10960
10961$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10962
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10964$as_echo "yes" >&6; }
10965
10966else
10967
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
10970
10971fi
10972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10973
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010974# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10976$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010979if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980 withval=$with_doc_strings;
10981fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010982
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010983
10984if test -z "$with_doc_strings"
10985then with_doc_strings="yes"
10986fi
10987if test "$with_doc_strings" != "no"
10988then
10989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010991
10992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10994$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010995
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010996# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10998$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011001if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002 withval=$with_pymalloc;
11003fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011004
Neil Schemenauera35c6882001-02-27 04:45:05 +000011005
Neil Schemenauer16c22972002-03-22 15:34:49 +000011006if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011007then
11008 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011009fi
11010if test "$with_pymalloc" != "no"
11011then
Martin v. Löwis11437992002-04-12 09:54:03 +000011012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011014
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011015 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11018$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011019
Benjamin Peterson05159c42009-12-03 03:01:27 +000011020# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11022$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023
11024# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011026 withval=$with_valgrind;
11027else
11028 with_valgrind=no
11029fi
11030
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11032$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011033if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 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 +020011035if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011036
Matthias Kloseb9621712010-04-24 17:59:49 +000011037$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011038
11039else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011040 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011041
11042fi
11043
11044
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011045 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011046fi
11047
Łukasz Langaa785c872016-09-09 17:37:37 -070011048# Check for DTrace support
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11050$as_echo_n "checking for --with-dtrace... " >&6; }
11051
11052# Check whether --with-dtrace was given.
11053if test "${with_dtrace+set}" = set; then :
11054 withval=$with_dtrace;
11055else
11056 with_dtrace=no
11057fi
11058
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11060$as_echo "$with_dtrace" >&6; }
11061
11062
11063
11064
11065
11066DTRACE=
11067DFLAGS=
11068DTRACE_HEADERS=
11069DTRACE_OBJS=
11070
11071if test "$with_dtrace" = "yes"
11072then
11073 # Extract the first word of "dtrace", so it can be a program name with args.
11074set dummy dtrace; ac_word=$2
11075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11076$as_echo_n "checking for $ac_word... " >&6; }
11077if ${ac_cv_path_DTRACE+:} false; then :
11078 $as_echo_n "(cached) " >&6
11079else
11080 case $DTRACE in
11081 [\\/]* | ?:[\\/]*)
11082 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11083 ;;
11084 *)
11085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11086for as_dir in $PATH
11087do
11088 IFS=$as_save_IFS
11089 test -z "$as_dir" && as_dir=.
11090 for ac_exec_ext in '' $ac_executable_extensions; do
11091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11092 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11094 break 2
11095 fi
11096done
11097 done
11098IFS=$as_save_IFS
11099
11100 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11101 ;;
11102esac
11103fi
11104DTRACE=$ac_cv_path_DTRACE
11105if test -n "$DTRACE"; then
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11107$as_echo "$DTRACE" >&6; }
11108else
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
11111fi
11112
11113
11114 if test "$DTRACE" = "not found"; then
11115 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11116 fi
11117
11118$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11119
11120 DTRACE_HEADERS="Include/pydtrace_probes.h"
11121
11122 # On OS X, DTrace providers do not need to be explicitly compiled and
11123 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11124 # generation flag '-G'. We check for presence of this flag, rather than
11125 # hardcoding support by OS, in the interest of robustness.
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11127$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11128if ${ac_cv_dtrace_link+:} false; then :
11129 $as_echo_n "(cached) " >&6
11130else
11131 ac_cv_dtrace_link=no
11132 echo 'BEGIN' > conftest.d
11133 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11134 ac_cv_dtrace_link=yes
11135
11136fi
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11138$as_echo "$ac_cv_dtrace_link" >&6; }
11139 if test "$ac_cv_dtrace_link" = "yes"; then
11140 DTRACE_OBJS="Python/pydtrace.o"
11141 fi
11142fi
11143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011144# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011145
Guido van Rossum98935bf2001-09-05 19:13:16 +000011146DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011147
Guido van Rossume97ee181999-12-20 21:27:22 +000011148# the dlopen() function means we might want to use dynload_shlib.o. some
11149# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011150for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011151do :
11152 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011153if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011155#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011156_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011157
Guido van Rossume97ee181999-12-20 21:27:22 +000011158fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011159done
Guido van Rossume97ee181999-12-20 21:27:22 +000011160
Michael W. Hudson54241132001-12-07 15:38:26 +000011161
Guido van Rossume97ee181999-12-20 21:27:22 +000011162# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11163# loading of modules.
11164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11166$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011167if test -z "$DYNLOADFILE"
11168then
11169 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011170 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11171 if test "$ac_cv_func_dlopen" = yes
11172 then DYNLOADFILE="dynload_shlib.o"
11173 else DYNLOADFILE="dynload_aix.o"
11174 fi
11175 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011176 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011177 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11178 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011179 *)
11180 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11181 # out any dynamic loading
11182 if test "$ac_cv_func_dlopen" = yes
11183 then DYNLOADFILE="dynload_shlib.o"
11184 else DYNLOADFILE="dynload_stub.o"
11185 fi
11186 ;;
11187 esac
11188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11190$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011191if test "$DYNLOADFILE" != "dynload_stub.o"
11192then
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
Matthias Kloseb9621712010-04-24 17:59:49 +000011194$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011195
11196fi
11197
Neil Schemenauer4e425612001-06-19 15:44:15 +000011198# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11199
Michael W. Hudson54241132001-12-07 15:38:26 +000011200
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11202$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011203if test -z "$MACHDEP_OBJS"
11204then
Jack Jansene578a632001-08-15 01:27:14 +000011205 MACHDEP_OBJS=$extra_machdep_objs
11206else
11207 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011208fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011209if test -z "$MACHDEP_OBJS"; then
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11211$as_echo "none" >&6; }
11212else
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11214$as_echo "$MACHDEP_OBJS" >&6; }
11215fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011216
Guido van Rossum627b2d71993-12-24 10:39:16 +000011217# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011218for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011219 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011220 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011221 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011222 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011223 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011224 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011225 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11226 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011227 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011228 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011229 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011230 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011231 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011232 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011233 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11234 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011235 sigaction sigaltstack siginterrupt sigpending sigrelse \
11236 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011237 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011238 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011239 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011240do :
11241 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11242ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011243if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011246_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011247
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011248fi
11249done
11250
Michael W. Hudson54241132001-12-07 15:38:26 +000011251
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011252ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11253 #include <dirent.h>
11254"
11255if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11256
11257$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11258
11259fi
11260
11261
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262# For some functions, having a definition is not sufficient, since
11263# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11265$as_echo_n "checking for chroot... " >&6; }
11266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011268#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269int
11270main ()
11271{
11272void *x=chroot
11273 ;
11274 return 0;
11275}
11276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011280
Matthias Kloseb159a552010-04-25 21:00:44 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011283else
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11285$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011286
11287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11290$as_echo_n "checking for link... " >&6; }
11291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011293#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294int
11295main ()
11296{
11297void *x=link
11298 ;
11299 return 0;
11300}
11301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305
Matthias Kloseb159a552010-04-25 21:00:44 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011308else
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11310$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011311
11312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11315$as_echo_n "checking for symlink... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319int
11320main ()
11321{
11322void *x=symlink
11323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330
Matthias Kloseb159a552010-04-25 21:00:44 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011333else
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011336
11337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11340$as_echo_n "checking for fchdir... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011343#include <unistd.h>
11344int
11345main ()
11346{
11347void *x=fchdir
11348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011355
Matthias Kloseb159a552010-04-25 21:00:44 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011358else
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011361
11362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11365$as_echo_n "checking for fsync... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011368#include <unistd.h>
11369int
11370main ()
11371{
11372void *x=fsync
11373 ;
11374 return 0;
11375}
11376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380
Matthias Kloseb159a552010-04-25 21:00:44 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011382$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011383else
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011386
11387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11390$as_echo_n "checking for fdatasync... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393#include <unistd.h>
11394int
11395main ()
11396{
11397void *x=fdatasync
11398 ;
11399 return 0;
11400}
11401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405
Matthias Kloseb159a552010-04-25 21:00:44 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011408else
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011411
11412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11415$as_echo_n "checking for epoll... " >&6; }
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011417/* end confdefs.h. */
11418#include <sys/epoll.h>
11419int
11420main ()
11421{
11422void *x=epoll_create
11423 ;
11424 return 0;
11425}
11426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011430
Matthias Kloseb159a552010-04-25 21:00:44 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011436
11437fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11440$as_echo_n "checking for epoll_create1... " >&6; }
11441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11442/* end confdefs.h. */
11443#include <sys/epoll.h>
11444int
11445main ()
11446{
11447void *x=epoll_create1
11448 ;
11449 return 0;
11450}
11451_ACEOF
11452if ac_fn_c_try_compile "$LINENO"; then :
11453
11454$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11455
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11457$as_echo "yes" >&6; }
11458else
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
11461
11462fi
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11465$as_echo_n "checking for kqueue... " >&6; }
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467/* end confdefs.h. */
11468
11469#include <sys/types.h>
11470#include <sys/event.h>
11471
11472int
11473main ()
11474{
11475int x=kqueue()
11476 ;
11477 return 0;
11478}
11479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011480if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483
Matthias Kloseb159a552010-04-25 21:00:44 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011485$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011486else
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011489
11490fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11493$as_echo_n "checking for prlimit... " >&6; }
11494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11495/* end confdefs.h. */
11496
11497#include <sys/time.h>
11498#include <sys/resource.h>
11499
11500int
11501main ()
11502{
11503void *x=prlimit
11504 ;
11505 return 0;
11506}
11507_ACEOF
11508if ac_fn_c_try_compile "$LINENO"; then :
11509
11510$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11511
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11513$as_echo "yes" >&6; }
11514else
11515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11516$as_echo "no" >&6; }
11517
11518fi
11519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11520
Martin v. Löwisd5843682002-11-21 20:41:28 +000011521# On some systems (eg. FreeBSD 5), we would find a definition of the
11522# functions ctermid_r, setgroups in the library, but no prototype
11523# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11524# address to avoid compiler warnings and potential miscompilations
11525# because of the missing prototypes.
11526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11528$as_echo_n "checking for ctermid_r... " >&6; }
11529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011530/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011531
Martin v. Löwisd5843682002-11-21 20:41:28 +000011532#include <stdio.h>
11533
Martin v. Löwisd5843682002-11-21 20:41:28 +000011534int
11535main ()
11536{
11537void* p = ctermid_r
11538 ;
11539 return 0;
11540}
11541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011543
Matthias Kloseb9621712010-04-24 17:59:49 +000011544$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011545
Matthias Kloseb159a552010-04-25 21:00:44 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011551
11552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11554
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11556$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011557if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011558 $as_echo_n "(cached) " >&6
11559else
11560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011561/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011562#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011563int
11564main ()
11565{
11566void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011567
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011568 ;
11569 return 0;
11570}
11571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011572if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011573 ac_cv_flock_decl=yes
11574else
11575 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011576
11577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011579
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011580fi
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11582$as_echo "$ac_cv_flock_decl" >&6; }
11583if test "x${ac_cv_flock_decl}" = xyes; then
11584 for ac_func in flock
11585do :
11586 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011587if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011588 cat >>confdefs.h <<_ACEOF
11589#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011590_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011591
Antoine Pitroua3000072010-09-07 14:52:42 +000011592else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011594$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011596 $as_echo_n "(cached) " >&6
11597else
11598 ac_check_lib_save_LIBS=$LIBS
11599LIBS="-lbsd $LIBS"
11600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11601/* end confdefs.h. */
11602
11603/* Override any GCC internal prototype to avoid an error.
11604 Use char because int might match the return type of a GCC
11605 builtin and then its argument prototype would still apply. */
11606#ifdef __cplusplus
11607extern "C"
11608#endif
11609char flock ();
11610int
11611main ()
11612{
11613return flock ();
11614 ;
11615 return 0;
11616}
11617_ACEOF
11618if ac_fn_c_try_link "$LINENO"; then :
11619 ac_cv_lib_bsd_flock=yes
11620else
11621 ac_cv_lib_bsd_flock=no
11622fi
11623rm -f core conftest.err conftest.$ac_objext \
11624 conftest$ac_exeext conftest.$ac_ext
11625LIBS=$ac_check_lib_save_LIBS
11626fi
11627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11628$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011629if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011630 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011631
11632
11633$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11634
11635
11636fi
11637
11638
11639fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011640done
11641
Antoine Pitroua3000072010-09-07 14:52:42 +000011642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11645$as_echo_n "checking for getpagesize... " >&6; }
11646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011647/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011648
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011649#include <unistd.h>
11650
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011651int
11652main ()
11653{
11654void* p = getpagesize
11655 ;
11656 return 0;
11657}
11658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011662
Matthias Kloseb159a552010-04-25 21:00:44 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011668
11669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011671
Victor Stinner984890f2011-11-24 13:53:38 +010011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11673$as_echo_n "checking for broken unsetenv... " >&6; }
11674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675/* end confdefs.h. */
11676
11677#include <stdlib.h>
11678
11679int
11680main ()
11681{
11682int res = unsetenv("DUMMY")
11683 ;
11684 return 0;
11685}
11686_ACEOF
11687if ac_fn_c_try_compile "$LINENO"; then :
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
11690else
11691
11692$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11693
11694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11695$as_echo "yes" >&6; }
11696
11697fi
11698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11699
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011700for ac_prog in true
11701do
11702 # Extract the first word of "$ac_prog", so it can be a program name with args.
11703set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011706if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011708else
11709 if test -n "$TRUE"; then
11710 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11711else
11712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11713for as_dir in $PATH
11714do
11715 IFS=$as_save_IFS
11716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011719 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 $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 +000011721 break 2
11722 fi
11723done
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011726
11727fi
11728fi
11729TRUE=$ac_cv_prog_TRUE
11730if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11732$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011736fi
11737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011738
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011739 test -n "$TRUE" && break
11740done
11741test -n "$TRUE" || TRUE="/bin/true"
11742
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11745$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011746if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011748else
11749 ac_check_lib_save_LIBS=$LIBS
11750LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011752/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011754/* Override any GCC internal prototype to avoid an error.
11755 Use char because int might match the return type of a GCC
11756 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757#ifdef __cplusplus
11758extern "C"
11759#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011760char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011761int
11762main ()
11763{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011764return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011765 ;
11766 return 0;
11767}
11768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011769if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011770 ac_cv_lib_c_inet_aton=yes
11771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011774rm -f core conftest.err conftest.$ac_objext \
11775 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776LIBS=$ac_check_lib_save_LIBS
11777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11779$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011780if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011781 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11784$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011785if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787else
11788 ac_check_lib_save_LIBS=$LIBS
11789LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011791/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793/* Override any GCC internal prototype to avoid an error.
11794 Use char because int might match the return type of a GCC
11795 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796#ifdef __cplusplus
11797extern "C"
11798#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011799char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800int
11801main ()
11802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011809 ac_cv_lib_resolv_inet_aton=yes
11810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813rm -f core conftest.err conftest.$ac_objext \
11814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815LIBS=$ac_check_lib_save_LIBS
11816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11818$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011819if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820 cat >>confdefs.h <<_ACEOF
11821#define HAVE_LIBRESOLV 1
11822_ACEOF
11823
11824 LIBS="-lresolv $LIBS"
11825
11826fi
11827
11828
11829fi
11830
11831
Christian Heimesd0764e22007-12-04 15:00:33 +000011832# On Tru64, chflags seems to be present, but calling it will
11833# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11835$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011836if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011840 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011843/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011844
Christian Heimesd0764e22007-12-04 15:00:33 +000011845#include <sys/stat.h>
11846#include <unistd.h>
11847int main(int argc, char*argv[])
11848{
11849 if(chflags(argv[0], 0) != 0)
11850 return 1;
11851 return 0;
11852}
Ned Deily3eb67d52011-06-28 00:00:28 -070011853
Christian Heimesd0764e22007-12-04 15:00:33 +000011854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011856 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011862fi
11863
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011864
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11867$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011868if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011870if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011871 ac_cv_have_chflags="yes"
11872else
11873 ac_cv_have_chflags="no"
11874fi
11875
11876fi
11877if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011880
11881fi
11882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11884$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011885if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011889 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011892/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011893
Christian Heimesd0764e22007-12-04 15:00:33 +000011894#include <sys/stat.h>
11895#include <unistd.h>
11896int main(int argc, char*argv[])
11897{
11898 if(lchflags(argv[0], 0) != 0)
11899 return 1;
11900 return 0;
11901}
Ned Deily3eb67d52011-06-28 00:00:28 -070011902
Christian Heimesd0764e22007-12-04 15:00:33 +000011903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011905 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011911fi
11912
11913
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11916$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011917if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011920 ac_cv_have_lchflags="yes"
11921else
11922 ac_cv_have_lchflags="no"
11923fi
11924
11925fi
11926if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011929
11930fi
11931
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011932case $ac_sys_system/$ac_sys_release in
11933Darwin/*)
11934 _CUR_CFLAGS="${CFLAGS}"
11935 _CUR_LDFLAGS="${LDFLAGS}"
11936 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11937 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11938 ;;
11939esac
11940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11942$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011943if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011945else
11946 ac_check_lib_save_LIBS=$LIBS
11947LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011949/* end confdefs.h. */
11950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951/* Override any GCC internal prototype to avoid an error.
11952 Use char because int might match the return type of a GCC
11953 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954#ifdef __cplusplus
11955extern "C"
11956#endif
11957char inflateCopy ();
11958int
11959main ()
11960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011961return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011962 ;
11963 return 0;
11964}
11965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011966if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011967 ac_cv_lib_z_inflateCopy=yes
11968else
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971rm -f core conftest.err conftest.$ac_objext \
11972 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011973LIBS=$ac_check_lib_save_LIBS
11974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11976$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011977if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011980
11981fi
11982
11983
11984case $ac_sys_system/$ac_sys_release in
11985Darwin/*)
11986 CFLAGS="${_CUR_CFLAGS}"
11987 LDFLAGS="${_CUR_LDFLAGS}"
11988 ;;
11989esac
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11992$as_echo_n "checking for hstrerror... " >&6; }
11993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011994/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011995
Martin v. Löwise9416172003-05-03 10:12:45 +000011996#include <netdb.h>
11997
Martin v. Löwise9416172003-05-03 10:12:45 +000011998int
11999main ()
12000{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012001void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012007
Matthias Kloseb9621712010-04-24 17:59:49 +000012008$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012009
Matthias Kloseb159a552010-04-25 21:00:44 +000012010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012011$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012012else
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
12016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012017rm -f core conftest.err conftest.$ac_objext \
12018 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12021$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40:11 +000012025#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012026#include <sys/socket.h>
12027#include <netinet/in.h>
12028#include <arpa/inet.h>
12029
Martin v. Löwise9416172003-05-03 10:12:45 +000012030int
12031main ()
12032{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012033void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012041
Matthias Kloseb159a552010-04-25 21:00:44 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012043$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012044else
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
12048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012049rm -f core conftest.err conftest.$ac_objext \
12050 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12053$as_echo_n "checking for inet_pton... " >&6; }
12054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012055/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012056
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012057#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012058#include <sys/socket.h>
12059#include <netinet/in.h>
12060#include <arpa/inet.h>
12061
Martin v. Löwise9416172003-05-03 10:12:45 +000012062int
12063main ()
12064{
12065void* p = inet_pton
12066 ;
12067 return 0;
12068}
12069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012071
Matthias Kloseb9621712010-04-24 17:59:49 +000012072$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012073
Matthias Kloseb159a552010-04-25 21:00:44 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12078$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012079
12080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012082
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012083# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12085$as_echo_n "checking for setgroups... " >&6; }
12086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012087/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012088
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012089#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012090#ifdef HAVE_GRP_H
12091#include <grp.h>
12092#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012093
Martin v. Löwisd5843682002-11-21 20:41:28 +000012094int
12095main ()
12096{
12097void* p = setgroups
12098 ;
12099 return 0;
12100}
12101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012105
Matthias Kloseb159a552010-04-25 21:00:44 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012108else
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12110$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012111
12112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012114
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012115# check for openpty and forkpty
12116
12117for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012118do :
12119 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012123_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12127$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012128if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012130else
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012132LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136/* Override any GCC internal prototype to avoid an error.
12137 Use char because int might match the return type of a GCC
12138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012139#ifdef __cplusplus
12140extern "C"
12141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012142char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012143int
12144main ()
12145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ;
12148 return 0;
12149}
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core conftest.err conftest.$ac_objext \
12157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012158LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12161$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012162if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12167$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012168if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170else
12171 ac_check_lib_save_LIBS=$LIBS
12172LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174/* end confdefs.h. */
12175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176/* Override any GCC internal prototype to avoid an error.
12177 Use char because int might match the return type of a GCC
12178 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012179#ifdef __cplusplus
12180extern "C"
12181#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012182char openpty ();
12183int
12184main ()
12185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012192 ac_cv_lib_bsd_openpty=yes
12193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196rm -f core conftest.err conftest.$ac_objext \
12197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198LIBS=$ac_check_lib_save_LIBS
12199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12201$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012202if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204 LIBS="$LIBS -lbsd"
12205fi
12206
12207
12208fi
12209
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210
12211fi
12212done
12213
12214for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012215do :
12216 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012217if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012219#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012220_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012221
Fred Drake8cef4cf2000-06-28 16:40:38 +000012222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12224$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012225if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012227else
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012229LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233/* Override any GCC internal prototype to avoid an error.
12234 Use char because int might match the return type of a GCC
12235 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012236#ifdef __cplusplus
12237extern "C"
12238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012239char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012240int
12241main ()
12242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 ;
12245 return 0;
12246}
12247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012250else
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012253rm -f core conftest.err conftest.$ac_objext \
12254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012255LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12258$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012259if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012261 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12264$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012265if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012267else
12268 ac_check_lib_save_LIBS=$LIBS
12269LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271/* end confdefs.h. */
12272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273/* Override any GCC internal prototype to avoid an error.
12274 Use char because int might match the return type of a GCC
12275 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012276#ifdef __cplusplus
12277extern "C"
12278#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012279char forkpty ();
12280int
12281main ()
12282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012284 ;
12285 return 0;
12286}
12287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012289 ac_cv_lib_bsd_forkpty=yes
12290else
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012293rm -f core conftest.err conftest.$ac_objext \
12294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012295LIBS=$ac_check_lib_save_LIBS
12296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12298$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012299if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012301 LIBS="$LIBS -lbsd"
12302fi
12303
12304
12305fi
12306
Fred Drake8cef4cf2000-06-28 16:40:38 +000012307
12308fi
12309done
12310
Jack Jansendd19cf82001-12-06 22:36:17 +000012311
Christian Heimesb186d002008-03-18 15:15:01 +000012312# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012313for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012314do :
12315 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012316if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012317 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012318#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012319_ACEOF
12320
12321fi
12322done
12323
12324
Michael W. Hudson54241132001-12-07 15:38:26 +000012325# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012326for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012327do :
12328 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12329ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012330if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012333_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012334
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012335fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012336done
12337
Michael W. Hudson54241132001-12-07 15:38:26 +000012338
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012339ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012341 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012342
Martin v. Löwis1142de32002-03-29 16:28:31 +000012343else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012345 *" dup2.$ac_objext "* ) ;;
12346 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012348esac
12349
Martin v. Löwis1142de32002-03-29 16:28:31 +000012350fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012351
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012352ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012353if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012354 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12355
12356else
12357 case " $LIBOBJS " in
12358 *" strdup.$ac_objext "* ) ;;
12359 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12360 ;;
12361esac
12362
12363fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012364
12365
12366for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012367do :
12368 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012369if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012374/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012376int
12377main ()
12378{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012379getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 ;
12381 return 0;
12382}
12383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012387
Guido van Rossum627b2d71993-12-24 10:39:16 +000012388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012390
Guido van Rossum627b2d71993-12-24 10:39:16 +000012391fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012392done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012393
Jack Jansen150753c2003-03-29 22:07:47 +000012394for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012395do :
12396 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012397if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012399#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012402/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012403#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012404int
12405main ()
12406{
12407setpgrp(0,0);
12408 ;
12409 return 0;
12410}
12411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
Matthias Kloseb9621712010-04-24 17:59:49 +000012414$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012415
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012418
12419fi
12420done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012421
Thomas Wouters3a584202000-08-05 23:28:51 +000012422for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012423do :
12424 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012425if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012427#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_compile "$LINENO"; then :
12441
Guido van Rossum627b2d71993-12-24 10:39:16 +000012442else
Skip Montanaro6dead952003-09-25 14:50:04 +000012443
Matthias Kloseb9621712010-04-24 17:59:49 +000012444$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012449
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012451done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012452
Michael W. Hudson54241132001-12-07 15:38:26 +000012453
Victor Stinnere0be4232011-10-25 13:06:09 +020012454for ac_func in clock_gettime
12455do :
12456 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12457if test "x$ac_cv_func_clock_gettime" = xyes; then :
12458 cat >>confdefs.h <<_ACEOF
12459#define HAVE_CLOCK_GETTIME 1
12460_ACEOF
12461
12462else
12463
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12465$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12466if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12467 $as_echo_n "(cached) " >&6
12468else
12469 ac_check_lib_save_LIBS=$LIBS
12470LIBS="-lrt $LIBS"
12471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12472/* end confdefs.h. */
12473
12474/* Override any GCC internal prototype to avoid an error.
12475 Use char because int might match the return type of a GCC
12476 builtin and then its argument prototype would still apply. */
12477#ifdef __cplusplus
12478extern "C"
12479#endif
12480char clock_gettime ();
12481int
12482main ()
12483{
12484return clock_gettime ();
12485 ;
12486 return 0;
12487}
12488_ACEOF
12489if ac_fn_c_try_link "$LINENO"; then :
12490 ac_cv_lib_rt_clock_gettime=yes
12491else
12492 ac_cv_lib_rt_clock_gettime=no
12493fi
12494rm -f core conftest.err conftest.$ac_objext \
12495 conftest$ac_exeext conftest.$ac_ext
12496LIBS=$ac_check_lib_save_LIBS
12497fi
12498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12499$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12500if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12501
Victor Stinner7efb8332014-08-29 15:41:08 +020012502 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012503 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12504
12505
12506$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12507
12508
12509fi
12510
12511
12512fi
12513done
12514
12515
12516for ac_func in clock_getres
12517do :
12518 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12519if test "x$ac_cv_func_clock_getres" = xyes; then :
12520 cat >>confdefs.h <<_ACEOF
12521#define HAVE_CLOCK_GETRES 1
12522_ACEOF
12523
12524else
12525
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12527$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12528if ${ac_cv_lib_rt_clock_getres+:} false; then :
12529 $as_echo_n "(cached) " >&6
12530else
12531 ac_check_lib_save_LIBS=$LIBS
12532LIBS="-lrt $LIBS"
12533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12534/* end confdefs.h. */
12535
12536/* Override any GCC internal prototype to avoid an error.
12537 Use char because int might match the return type of a GCC
12538 builtin and then its argument prototype would still apply. */
12539#ifdef __cplusplus
12540extern "C"
12541#endif
12542char clock_getres ();
12543int
12544main ()
12545{
12546return clock_getres ();
12547 ;
12548 return 0;
12549}
12550_ACEOF
12551if ac_fn_c_try_link "$LINENO"; then :
12552 ac_cv_lib_rt_clock_getres=yes
12553else
12554 ac_cv_lib_rt_clock_getres=no
12555fi
12556rm -f core conftest.err conftest.$ac_objext \
12557 conftest$ac_exeext conftest.$ac_ext
12558LIBS=$ac_check_lib_save_LIBS
12559fi
12560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12561$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12562if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12563
12564 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12565
12566
12567fi
12568
12569
12570fi
12571done
12572
12573
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012574for ac_func in clock_settime
12575do :
12576 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12577if test "x$ac_cv_func_clock_settime" = xyes; then :
12578 cat >>confdefs.h <<_ACEOF
12579#define HAVE_CLOCK_SETTIME 1
12580_ACEOF
12581
12582else
12583
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12585$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12586if ${ac_cv_lib_rt_clock_settime+:} false; then :
12587 $as_echo_n "(cached) " >&6
12588else
12589 ac_check_lib_save_LIBS=$LIBS
12590LIBS="-lrt $LIBS"
12591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592/* end confdefs.h. */
12593
12594/* Override any GCC internal prototype to avoid an error.
12595 Use char because int might match the return type of a GCC
12596 builtin and then its argument prototype would still apply. */
12597#ifdef __cplusplus
12598extern "C"
12599#endif
12600char clock_settime ();
12601int
12602main ()
12603{
12604return clock_settime ();
12605 ;
12606 return 0;
12607}
12608_ACEOF
12609if ac_fn_c_try_link "$LINENO"; then :
12610 ac_cv_lib_rt_clock_settime=yes
12611else
12612 ac_cv_lib_rt_clock_settime=no
12613fi
12614rm -f core conftest.err conftest.$ac_objext \
12615 conftest$ac_exeext conftest.$ac_ext
12616LIBS=$ac_check_lib_save_LIBS
12617fi
12618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12619$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12620if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12621
12622 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12623
12624
12625fi
12626
12627
12628fi
12629done
12630
12631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12633$as_echo_n "checking for major... " >&6; }
12634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012635/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012636
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012637#if defined(MAJOR_IN_MKDEV)
12638#include <sys/mkdev.h>
12639#elif defined(MAJOR_IN_SYSMACROS)
12640#include <sys/sysmacros.h>
12641#else
12642#include <sys/types.h>
12643#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012644
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012645int
12646main ()
12647{
12648
12649 makedev(major(0),minor(0));
12650
12651 ;
12652 return 0;
12653}
12654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012655if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012656
12657
Matthias Kloseb9621712010-04-24 17:59:49 +000012658$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012659
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12661$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012662
12663else
Skip Montanaro6dead952003-09-25 14:50:04 +000012664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12666$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012667
12668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012669rm -f core conftest.err conftest.$ac_objext \
12670 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012671
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012672# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012673# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12675$as_echo_n "checking for getaddrinfo... " >&6; }
12676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012677/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012678
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012679#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012680#include <sys/socket.h>
12681#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012682#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683
Martin v. Löwis11437992002-04-12 09:54:03 +000012684int
12685main ()
12686{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012687getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012693 have_getaddrinfo=yes
12694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012697rm -f core conftest.err conftest.$ac_objext \
12698 conftest$ac_exeext conftest.$ac_ext
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12700$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012701if test $have_getaddrinfo = yes
12702then
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12704$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012705 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012707else
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012709
12710if test "${enable_ipv6+set}" = set; then
12711 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12712else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012713 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012714fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012715else
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012718
Stefan Krah19c21392012-11-22 23:47:32 +010012719#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720#include <sys/types.h>
12721#include <netdb.h>
12722#include <string.h>
12723#include <sys/socket.h>
12724#include <netinet/in.h>
12725
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012726int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012727{
12728 int passive, gaierr, inet4 = 0, inet6 = 0;
12729 struct addrinfo hints, *ai, *aitop;
12730 char straddr[INET6_ADDRSTRLEN], strport[16];
12731
12732 for (passive = 0; passive <= 1; passive++) {
12733 memset(&hints, 0, sizeof(hints));
12734 hints.ai_family = AF_UNSPEC;
12735 hints.ai_flags = passive ? AI_PASSIVE : 0;
12736 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012737 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12739 (void)gai_strerror(gaierr);
12740 goto bad;
12741 }
12742 for (ai = aitop; ai; ai = ai->ai_next) {
12743 if (ai->ai_addr == NULL ||
12744 ai->ai_addrlen == 0 ||
12745 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12746 straddr, sizeof(straddr), strport, sizeof(strport),
12747 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12748 goto bad;
12749 }
12750 switch (ai->ai_family) {
12751 case AF_INET:
12752 if (strcmp(strport, "54321") != 0) {
12753 goto bad;
12754 }
12755 if (passive) {
12756 if (strcmp(straddr, "0.0.0.0") != 0) {
12757 goto bad;
12758 }
12759 } else {
12760 if (strcmp(straddr, "127.0.0.1") != 0) {
12761 goto bad;
12762 }
12763 }
12764 inet4++;
12765 break;
12766 case AF_INET6:
12767 if (strcmp(strport, "54321") != 0) {
12768 goto bad;
12769 }
12770 if (passive) {
12771 if (strcmp(straddr, "::") != 0) {
12772 goto bad;
12773 }
12774 } else {
12775 if (strcmp(straddr, "::1") != 0) {
12776 goto bad;
12777 }
12778 }
12779 inet6++;
12780 break;
12781 case AF_UNSPEC:
12782 goto bad;
12783 break;
12784 default:
12785 /* another family support? */
12786 break;
12787 }
12788 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012789 freeaddrinfo(aitop);
12790 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012791 }
12792
12793 if (!(inet4 == 0 || inet4 == 2))
12794 goto bad;
12795 if (!(inet6 == 0 || inet6 == 2))
12796 goto bad;
12797
12798 if (aitop)
12799 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012800 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801
12802 bad:
12803 if (aitop)
12804 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012805 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012806}
12807
Martin v. Löwis11437992002-04-12 09:54:03 +000012808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012809if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012810 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811else
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012818fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12823$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12824
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012825if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012826then
12827 if test $ipv6 = yes
12828 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829 echo 'Fatal: You must get working getaddrinfo() function.'
12830 echo ' or you can specify "--disable-ipv6"'.
12831 exit 1
12832 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012833else
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012836
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012837fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012838
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012839for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012840do :
12841 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012842if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012844#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012845_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012846
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012847fi
12848done
12849
Michael W. Hudson54241132001-12-07 15:38:26 +000012850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12853$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012854if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859#include <sys/types.h>
12860#include <sys/time.h>
12861#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
Martin v. Löwis11437992002-04-12 09:54:03 +000012863int
12864main ()
12865{
12866if ((struct tm *) 0)
12867return 0;
12868 ;
12869 return 0;
12870}
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12880$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012881if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884
12885fi
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12888$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012889if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891else
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012893/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894#include <sys/types.h>
12895#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Martin v. Löwis11437992002-04-12 09:54:03 +000012897int
12898main ()
12899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900struct tm tm;
12901 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ;
12904 return 0;
12905}
12906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012908 ac_cv_struct_tm=time.h
12909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12915$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012916if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012919
12920fi
12921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922ac_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 +000012923#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012924
Matthias Kloseb9621712010-04-24 17:59:49 +000012925"
Victor Stinnere0be4232011-10-25 13:06:09 +020012926if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
12928cat >>confdefs.h <<_ACEOF
12929#define HAVE_STRUCT_TM_TM_ZONE 1
12930_ACEOF
12931
12932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012934
Martin v. Löwis11437992002-04-12 09:54:03 +000012935if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012938
12939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12941"
Victor Stinnere0be4232011-10-25 13:06:09 +020012942if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944else
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946fi
12947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012949#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950_ACEOF
12951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12953$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012954if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956else
Matthias Kloseb9621712010-04-24 17:59:49 +000012957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012958/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960#if !HAVE_DECL_TZNAME
12961extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964int
12965main ()
12966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 ;
12969 return 0;
12970}
12971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012972if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012973 ac_cv_var_tzname=yes
12974else
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012977rm -f core conftest.err conftest.$ac_objext \
12978 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12981$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012982 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012985
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012986 fi
12987fi
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989ac_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 +020012990if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
12992cat >>confdefs.h <<_ACEOF
12993#define HAVE_STRUCT_STAT_ST_RDEV 1
12994_ACEOF
12995
12996
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012997fi
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999ac_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 +020013000if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013001
Martin v. Löwis11437992002-04-12 09:54:03 +000013002cat >>confdefs.h <<_ACEOF
13003#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13004_ACEOF
13005
13006
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013007fi
13008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009ac_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 +020013010if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013011
13012cat >>confdefs.h <<_ACEOF
13013#define HAVE_STRUCT_STAT_ST_FLAGS 1
13014_ACEOF
13015
13016
13017fi
13018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019ac_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 +020013020if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013021
13022cat >>confdefs.h <<_ACEOF
13023#define HAVE_STRUCT_STAT_ST_GEN 1
13024_ACEOF
13025
13026
13027fi
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029ac_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 +020013030if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013031
13032cat >>confdefs.h <<_ACEOF
13033#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13034_ACEOF
13035
13036
13037fi
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039ac_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 +020013040if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013041
Martin v. Löwis11437992002-04-12 09:54:03 +000013042cat >>confdefs.h <<_ACEOF
13043#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13044_ACEOF
13045
13046
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013047fi
13048
Stefan Krah267b6392016-04-26 01:09:18 +020013049ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13050 #include <sys/types.h>
13051 #include <pwd.h>
13052
13053"
13054if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13055
13056cat >>confdefs.h <<_ACEOF
13057#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13058_ACEOF
13059
13060
13061fi
13062ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13063 #include <sys/types.h>
13064 #include <pwd.h>
13065
13066"
13067if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13068
13069cat >>confdefs.h <<_ACEOF
13070#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13071_ACEOF
13072
13073
13074fi
13075
Michael W. Hudson54241132001-12-07 15:38:26 +000013076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13078$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013079if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013081else
Matthias Kloseb159a552010-04-25 21:00:44 +000013082
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013085#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013086int
13087main ()
13088{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 ;
13091 return 0;
13092}
13093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013094if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095 ac_cv_header_time_altzone=yes
13096else
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101fi
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13104$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013105if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108
13109fi
13110
Guido van Rossumda88dad1995-01-26 00:46:29 +000013111was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13113$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013115/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013116
13117#include <sys/types.h>
13118#include <sys/select.h>
13119#include <sys/time.h>
13120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124;
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ;
13126 return 0;
13127}
13128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013129if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013130
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013134 was_it_defined=yes
13135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13139$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13142$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013143if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145else
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013147/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013148#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013149int
13150main ()
13151{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158 ac_cv_struct_addrinfo=yes
13159else
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13163fi
13164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13166$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170
13171fi
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13174$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013175if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013179/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180
13181# include <sys/types.h>
13182# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013183int
13184main ()
13185{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ;
13188 return 0;
13189}
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192 ac_cv_struct_sockaddr_storage=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13197fi
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13200$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013201if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204
13205fi
13206
Christian Heimesdffa3942016-09-05 23:54:41 +020013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13208$as_echo_n "checking for sockaddr_alg... " >&6; }
13209if ${ac_cv_struct_sockaddr_alg+:} false; then :
13210 $as_echo_n "(cached) " >&6
13211else
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213/* end confdefs.h. */
13214
13215# include <sys/types.h>
13216# include <sys/socket.h>
13217# include <linux/if_alg.h>
13218int
13219main ()
13220{
13221struct sockaddr_alg s
13222 ;
13223 return 0;
13224}
13225_ACEOF
13226if ac_fn_c_try_compile "$LINENO"; then :
13227 ac_cv_struct_sockaddr_alg=yes
13228else
13229 ac_cv_struct_sockaddr_alg=no
13230fi
13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232fi
13233
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13235$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13236if test $ac_cv_struct_sockaddr_alg = yes; then
13237
13238$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13239
13240fi
13241
Guido van Rossum627b2d71993-12-24 10:39:16 +000013242# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013243
Matthias Kloseb9621712010-04-24 17:59:49 +000013244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13245$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013246if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013251$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013252int
13253main ()
13254{
13255static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013256test_array [0] = 0;
13257return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013258
13259 ;
13260 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013261}
Martin v. Löwis11437992002-04-12 09:54:03 +000013262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013263if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013264 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013265else
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13271$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274
13275fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13278$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013279if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013290 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013292 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294 char const *const *pcpcc;
13295 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013296 /* NEC SVR4.0.2 mips cc rejects this. */
13297 struct point {int x, y;};
13298 static struct point const zero = {0,0};
13299 /* AIX XL C 1.02.0.0 rejects this.
13300 It does not let you subtract one const X* pointer from another in
13301 an arm of an if-expression whose if-part is not a constant
13302 expression */
13303 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306 ++pcpcc;
13307 ppc = (char**) pcpcc;
13308 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013309 { /* SCO 3.2v4 cc rejects this sort of thing. */
13310 char tx;
13311 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 }
13317 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13318 int x[] = {25, 17};
13319 const int *foo = &x[0];
13320 ++foo;
13321 }
13322 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13323 typedef const int *iptr;
13324 iptr p = 0;
13325 ++p;
13326 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013327 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013329 struct s { int j; const int *ap[3]; } bx;
13330 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 }
13332 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13333 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013337#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 ;
13340 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013341}
Martin v. Löwis11437992002-04-12 09:54:03 +000013342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344 ac_cv_c_const=yes
13345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13351$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013352if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355
13356fi
13357
Michael W. Hudson54241132001-12-07 15:38:26 +000013358
Guido van Rossumda88dad1995-01-26 00:46:29 +000013359works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13361$as_echo_n "checking for working volatile... " >&6; }
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364
Martin v. Löwis11437992002-04-12 09:54:03 +000013365int
13366main ()
13367{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013374 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013375else
Skip Montanaro6dead952003-09-25 14:50:04 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013379
Guido van Rossum627b2d71993-12-24 10:39:16 +000013380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13383$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013384
Guido van Rossumda88dad1995-01-26 00:46:29 +000013385works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13387$as_echo_n "checking for working signed char... " >&6; }
13388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391int
13392main ()
13393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 ;
13396 return 0;
13397}
13398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013399if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013400 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013401else
Skip Montanaro6dead952003-09-25 14:50:04 +000013402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013404
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013405
Guido van Rossum7f43da71994-08-01 12:15:30 +000013406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13409$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013410
Guido van Rossumda88dad1995-01-26 00:46:29 +000013411have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13413$as_echo_n "checking for prototypes... " >&6; }
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013416int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013417int
13418main ()
13419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 ;
13422 return 0;
13423}
13424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Matthias Kloseb159a552010-04-25 21:00:44 +000013429 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13433$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013434
Guido van Rossumda88dad1995-01-26 00:46:29 +000013435works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13437$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013440
13441#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013442int foo(int x, ...) {
13443 va_list va;
13444 va_start(va, x);
13445 va_arg(va, int);
13446 va_arg(va, char *);
13447 va_arg(va, double);
13448 return 0;
13449}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451int
13452main ()
13453{
Guido van Rossum90eea071996-08-30 20:58:57 +000013454return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 ;
13456 return 0;
13457}
13458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013464 works=yes
13465
Guido van Rossum627b2d71993-12-24 10:39:16 +000013466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13469$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470
Martin v. Löwisd6320502004-08-12 13:45:08 +000013471# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13473$as_echo_n "checking for socketpair... " >&6; }
13474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013475/* end confdefs.h. */
13476
13477#include <sys/types.h>
13478#include <sys/socket.h>
13479
13480int
13481main ()
13482{
13483void *x=socketpair
13484 ;
13485 return 0;
13486}
13487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013491
Matthias Kloseb159a552010-04-25 21:00:44 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013493$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13496$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013497
13498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013500
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013501# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13503$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013506#include <sys/types.h>
13507#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013508int
13509main ()
13510{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013511struct sockaddr x;
13512x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if ac_fn_c_try_compile "$LINENO"; then :
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13519$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522
13523else
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13525$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013530# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013534if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13539$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013540 OLD_CFLAGS=$CFLAGS
13541 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013544
13545# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Martin v. Löwis11437992002-04-12 09:54:03 +000013547int
13548main ()
13549{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013550
13551 char *name;
13552 struct hostent *he, *res;
13553 char buffer[2048];
13554 int buflen = 2048;
13555 int h_errnop;
13556
13557 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
13559 ;
13560 return 0;
13561}
13562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013566
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Matthias Kloseb9621712010-04-24 17:59:49 +000013568$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13571$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013573else
Skip Montanaro6dead952003-09-25 14:50:04 +000013574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13578$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013582# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584int
13585main ()
13586{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013587
13588 char *name;
13589 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013590 char buffer[2048];
13591 int buflen = 2048;
13592 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013593
Matthias Kloseb159a552010-04-25 21:00:44 +000013594 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
13596 ;
13597 return 0;
13598}
13599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
Matthias Kloseb159a552010-04-25 21:00:44 +000013605$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13608$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610else
Skip Montanaro6dead952003-09-25 14:50:04 +000013611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13615$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617/* end confdefs.h. */
13618
13619# include <netdb.h>
13620
13621int
13622main ()
13623{
13624
13625 char *name;
13626 struct hostent *he;
13627 struct hostent_data data;
13628
13629 (void) gethostbyname_r(name, he, &data);
13630
13631 ;
13632 return 0;
13633}
13634_ACEOF
13635if ac_fn_c_try_compile "$LINENO"; then :
13636
13637 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13638
13639
13640$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13641
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13643$as_echo "yes" >&6; }
13644
13645else
13646
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013658 CFLAGS=$OLD_CFLAGS
13659
13660else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 for ac_func in gethostbyname
13663do :
13664 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013665if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013668_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013671done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013672
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674fi
13675
Michael W. Hudson54241132001-12-07 15:38:26 +000013676
13677
13678
13679
13680
13681
Guido van Rossum627b2d71993-12-24 10:39:16 +000013682# checks for system services
13683# (none yet)
13684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013686ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013687if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013688
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13691$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013692if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694else
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013696LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700/* Override any GCC internal prototype to avoid an error.
13701 Use char because int might match the return type of a GCC
13702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013703#ifdef __cplusplus
13704extern "C"
13705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013706char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013707int
13708main ()
13709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ;
13712 return 0;
13713}
13714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013717else
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013720rm -f core conftest.err conftest.$ac_objext \
13721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13725$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 cat >>confdefs.h <<_ACEOF
13728#define HAVE_LIBIEEE 1
13729_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013731 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732
Guido van Rossum627b2d71993-12-24 10:39:16 +000013733fi
13734
Michael W. Hudson54241132001-12-07 15:38:26 +000013735
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013736fi
13737
Michael W. Hudson54241132001-12-07 15:38:26 +000013738
Guido van Rossum7f253911997-05-09 02:42:48 +000013739# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13741$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013746if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013747then
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13752$as_echo "yes" >&6; }
13753else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013755fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013756else
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759fi
13760
Guido van Rossum7f253911997-05-09 02:42:48 +000013761
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762# check for --with-libm=...
13763
Guido van Rossum563e7081996-09-10 18:20:48 +000013764case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013765Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013766*) LIBM=-lm
13767esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13769$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013771# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013772if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013773 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013774if test "$withval" = no
13775then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13777$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013778elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013779then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13781$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013782else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013783fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013784else
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13786$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787fi
13788
Guido van Rossum7f43da71994-08-01 12:15:30 +000013789
13790# check for --with-libc=...
13791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13793$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013798if test "$withval" = no
13799then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13801$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013802elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013803then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13805$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013806else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013807fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13810$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811fi
13812
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813
Stefan Krah1919b7e2012-03-21 18:25:23 +010013814# **************************************
13815# * Check for gcc x64 inline assembler *
13816# **************************************
13817
13818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13819$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821/* end confdefs.h. */
13822
13823int
13824main ()
13825{
13826
13827 __asm__ __volatile__ ("movq %rcx, %rax");
13828
13829 ;
13830 return 0;
13831}
13832_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013833if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013834 have_gcc_asm_for_x64=yes
13835else
13836 have_gcc_asm_for_x64=no
13837fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013838rm -f core conftest.err conftest.$ac_objext \
13839 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13841$as_echo "$have_gcc_asm_for_x64" >&6; }
13842if test "$have_gcc_asm_for_x64" = yes
13843then
13844
13845$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13846
13847fi
13848
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013849# **************************************************
13850# * Check for various properties of floating point *
13851# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13854$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013855if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857else
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860 ac_cv_little_endian_double=no
13861else
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863/* end confdefs.h. */
13864
13865#include <string.h>
13866int main() {
13867 double x = 9006104071832581.0;
13868 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13869 return 0;
13870 else
13871 return 1;
13872}
13873
13874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876 ac_cv_little_endian_double=yes
13877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882fi
13883
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884fi
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13887$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888if test "$ac_cv_little_endian_double" = yes
13889then
13890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13896$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899else
13900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902 ac_cv_big_endian_double=no
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905/* end confdefs.h. */
13906
13907#include <string.h>
13908int main() {
13909 double x = 9006104071832581.0;
13910 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13911 return 0;
13912 else
13913 return 1;
13914}
13915
13916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918 ac_cv_big_endian_double=yes
13919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924fi
13925
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926fi
13927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13929$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930if test "$ac_cv_big_endian_double" = yes
13931then
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934
13935fi
13936
13937# Some ARM platforms use a mixed-endian representation for doubles.
13938# While Python doesn't currently have full support for these platforms
13939# (see e.g., issue 1762561), we can at least make sure that float <-> string
13940# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13942$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013943if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945else
13946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948 ac_cv_mixed_endian_double=no
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951/* end confdefs.h. */
13952
13953#include <string.h>
13954int main() {
13955 double x = 9006104071832581.0;
13956 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13957 return 0;
13958 else
13959 return 1;
13960}
13961
13962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013963if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964 ac_cv_mixed_endian_double=yes
13965else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013970fi
13971
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972fi
13973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13975$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976if test "$ac_cv_mixed_endian_double" = yes
13977then
13978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980
13981fi
13982
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013983# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013984# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013985# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013986# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013987# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013988# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013989
13990# This inline assembler syntax may also work for suncc and icc,
13991# so we try it on all platforms.
13992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13994$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996/* end confdefs.h. */
13997
13998int
13999main ()
14000{
14001
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014002 unsigned short cw;
14003 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14004 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014005
14006 ;
14007 return 0;
14008}
14009_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014010if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011 have_gcc_asm_for_x87=yes
14012else
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014015rm -f core conftest.err conftest.$ac_objext \
14016 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14018$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014019if test "$have_gcc_asm_for_x87" = yes
14020then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014023
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14027$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14029/* end confdefs.h. */
14030
14031int
14032main ()
14033{
14034
14035 unsigned int fpcr;
14036 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14037 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14038
14039 ;
14040 return 0;
14041}
14042_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014043if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014044 have_gcc_asm_for_mc68881=yes
14045else
14046 have_gcc_asm_for_mc68881=no
14047fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014048rm -f core conftest.err conftest.$ac_objext \
14049 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14051$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14052if test "$have_gcc_asm_for_mc68881" = yes
14053then
14054
14055$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14056
14057fi
14058
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014059# Detect whether system arithmetic is subject to x87-style double
14060# rounding issues. The result of this test has little meaning on non
14061# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14062# mode is round-to-nearest and double rounding issues are present, and
14063# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14065$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014066# $BASECFLAGS may affect the result
14067ac_save_cc="$CC"
14068CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014069if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014070 ac_cv_x87_double_rounding=no
14071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014073/* end confdefs.h. */
14074
14075#include <stdlib.h>
14076#include <math.h>
14077int main() {
14078 volatile double x, y, z;
14079 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14080 x = 0.99999999999999989; /* 1-2**-53 */
14081 y = 1./x;
14082 if (y != 1.)
14083 exit(0);
14084 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14085 x = 1e16;
14086 y = 2.99999;
14087 z = x + y;
14088 if (z != 1e16+4.)
14089 exit(0);
14090 /* both tests show evidence of double rounding */
14091 exit(1);
14092}
14093
14094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096 ac_cv_x87_double_rounding=no
14097else
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014102fi
14103
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014104CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14106$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014107if test "$ac_cv_x87_double_rounding" = yes
14108then
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014111
14112fi
14113
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014114# ************************************
14115# * Check for mathematical functions *
14116# ************************************
14117
14118LIBS_SAVE=$LIBS
14119LIBS="$LIBS $LIBM"
14120
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014121for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14122do :
14123 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14124ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014125if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014126 cat >>confdefs.h <<_ACEOF
14127#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14128_ACEOF
14129
14130fi
14131done
14132
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014133for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014134do :
14135 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14136ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014137if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138 cat >>confdefs.h <<_ACEOF
14139#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14140_ACEOF
14141
14142fi
14143done
14144
14145ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14146"
Victor Stinnere0be4232011-10-25 13:06:09 +020014147if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014148 ac_have_decl=1
14149else
14150 ac_have_decl=0
14151fi
14152
14153cat >>confdefs.h <<_ACEOF
14154#define HAVE_DECL_ISINF $ac_have_decl
14155_ACEOF
14156ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14157"
Victor Stinnere0be4232011-10-25 13:06:09 +020014158if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014159 ac_have_decl=1
14160else
14161 ac_have_decl=0
14162fi
14163
14164cat >>confdefs.h <<_ACEOF
14165#define HAVE_DECL_ISNAN $ac_have_decl
14166_ACEOF
14167ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14168"
Victor Stinnere0be4232011-10-25 13:06:09 +020014169if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014170 ac_have_decl=1
14171else
14172 ac_have_decl=0
14173fi
14174
14175cat >>confdefs.h <<_ACEOF
14176#define HAVE_DECL_ISFINITE $ac_have_decl
14177_ACEOF
14178
14179
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014180# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14181# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14183$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014184if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014186else
14187
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014189 ac_cv_tanh_preserves_zero_sign=no
14190else
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014192/* end confdefs.h. */
14193
14194#include <math.h>
14195#include <stdlib.h>
14196int main() {
14197 /* return 0 if either negative zeros don't exist
14198 on this platform or if negative zeros exist
14199 and tanh(-0.) == -0. */
14200 if (atan2(0., -1.) == atan2(-0., -1.) ||
14201 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14202 else exit(1);
14203}
14204
14205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014206if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014207 ac_cv_tanh_preserves_zero_sign=yes
14208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014213fi
14214
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014215fi
14216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14218$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014219if test "$ac_cv_tanh_preserves_zero_sign" = yes
14220then
14221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014223
14224fi
14225
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014226if test "$ac_cv_func_log1p" = yes
14227then
14228 # On some versions of AIX, log1p(-0.) returns 0. instead of
14229 # -0. See issue #9920.
14230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14231$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014232 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014233 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014235
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236 if test "$cross_compiling" = yes; then :
14237 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014238else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14240/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014241
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014242 #include <math.h>
14243 #include <stdlib.h>
14244 int main() {
14245 /* Fail if the signs of log1p(-0.) and -0. can be
14246 distinguished. */
14247 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14248 return 0;
14249 else
14250 return 1;
14251 }
14252
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014253_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014254if ac_fn_c_try_run "$LINENO"; then :
14255 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014256else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014257 ac_cv_log1p_drops_zero_sign=yes
14258fi
14259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14260 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014261fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014262
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014263fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014264
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14266$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14267fi
14268if test "$ac_cv_log1p_drops_zero_sign" = yes
14269then
14270
14271$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14272
14273fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014274
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014275LIBS=$LIBS_SAVE
14276
Mark Dickinsona614f042009-11-28 12:48:43 +000014277# For multiprocessing module, check that sem_open
14278# actually works. For FreeBSD versions <= 7.2,
14279# the kernel module that provides POSIX semaphores
14280# isn't loaded by default, so an attempt to call
14281# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14283$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014284if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014288 ac_cv_posix_semaphores_enabled=yes
14289else
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014291/* end confdefs.h. */
14292
14293#include <unistd.h>
14294#include <fcntl.h>
14295#include <stdio.h>
14296#include <semaphore.h>
14297#include <sys/stat.h>
14298
14299int main(void) {
14300 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14301 if (a == SEM_FAILED) {
14302 perror("sem_open");
14303 return 1;
14304 }
14305 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014306 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014307 return 0;
14308}
14309
14310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014311if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014312 ac_cv_posix_semaphores_enabled=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014318fi
14319
14320
Mark Dickinsona614f042009-11-28 12:48:43 +000014321fi
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14324$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014325if test $ac_cv_posix_semaphores_enabled = no
14326then
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014329
14330fi
14331
Mark Dickinson10683072009-04-18 21:18:19 +000014332# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14334$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014335if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014339 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014340else
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014342/* end confdefs.h. */
14343
14344#include <unistd.h>
14345#include <fcntl.h>
14346#include <stdio.h>
14347#include <semaphore.h>
14348#include <sys/stat.h>
14349
14350int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014351 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014352 int count;
14353 int res;
14354 if(a==SEM_FAILED){
14355 perror("sem_open");
14356 return 1;
14357
14358 }
14359 res = sem_getvalue(a, &count);
14360 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014361 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014362 return res==-1 ? 1 : 0;
14363}
14364
Mark Dickinson10683072009-04-18 21:18:19 +000014365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014366if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014367 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014373fi
14374
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014375
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014376fi
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14379$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380if test $ac_cv_broken_sem_getvalue = yes
14381then
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384
14385fi
14386
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014387ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14388"
14389if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14390 ac_have_decl=1
14391else
14392 ac_have_decl=0
14393fi
14394
14395cat >>confdefs.h <<_ACEOF
14396#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14397_ACEOF
14398ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14399"
14400if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14401 ac_have_decl=1
14402else
14403 ac_have_decl=0
14404fi
14405
14406cat >>confdefs.h <<_ACEOF
14407#define HAVE_DECL_RTLD_NOW $ac_have_decl
14408_ACEOF
14409ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14410"
14411if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14412 ac_have_decl=1
14413else
14414 ac_have_decl=0
14415fi
14416
14417cat >>confdefs.h <<_ACEOF
14418#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14419_ACEOF
14420ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14421"
14422if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14423 ac_have_decl=1
14424else
14425 ac_have_decl=0
14426fi
14427
14428cat >>confdefs.h <<_ACEOF
14429#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14430_ACEOF
14431ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14432"
14433if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14434 ac_have_decl=1
14435else
14436 ac_have_decl=0
14437fi
14438
14439cat >>confdefs.h <<_ACEOF
14440#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14441_ACEOF
14442ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14443"
14444if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14445 ac_have_decl=1
14446else
14447 ac_have_decl=0
14448fi
14449
14450cat >>confdefs.h <<_ACEOF
14451#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14452_ACEOF
14453ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14454"
14455if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14456 ac_have_decl=1
14457else
14458 ac_have_decl=0
14459fi
14460
14461cat >>confdefs.h <<_ACEOF
14462#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14463_ACEOF
14464
14465
Mark Dickinsonbd792642009-03-18 20:06:12 +000014466# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14468$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014469# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014470if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014471 enableval=$enable_big_digits; case $enable_big_digits in
14472yes)
14473 enable_big_digits=30 ;;
14474no)
14475 enable_big_digits=15 ;;
1447615|30)
14477 ;;
14478*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014479 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 +000014480esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14482$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014483
14484cat >>confdefs.h <<_ACEOF
14485#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14486_ACEOF
14487
14488
14489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14491$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014492fi
14493
14494
Guido van Rossumef2255b2000-03-10 22:30:29 +000014495# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014496ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014497if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014498
14499
Matthias Kloseb9621712010-04-24 17:59:49 +000014500$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014502 wchar_h="yes"
14503
Guido van Rossumef2255b2000-03-10 22:30:29 +000014504else
Martin v. Löwis11437992002-04-12 09:54:03 +000014505 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014506
14507fi
14508
Michael W. Hudson54241132001-12-07 15:38:26 +000014509
Martin v. Löwis11437992002-04-12 09:54:03 +000014510
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014511# determine wchar_t size
14512if test "$wchar_h" = yes
14513then
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14517# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14519$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014520if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14524"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Martin v. Löwis11437992002-04-12 09:54:03 +000014526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 if test "$ac_cv_type_wchar_t" = yes; then
14528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014530as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014531See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 else
14533 ac_cv_sizeof_wchar_t=0
14534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014536
Martin v. Löwis11437992002-04-12 09:54:03 +000014537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14539$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540
14541
14542
Martin v. Löwis11437992002-04-12 09:54:03 +000014543cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014544#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014545_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014546
Michael W. Hudson54241132001-12-07 15:38:26 +000014547
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014548fi
14549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14551$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014552have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014554/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014555
14556#include <tcl.h>
14557#if TCL_UTF_MAX != 6
14558# error "NOT UCS4_TCL"
14559#endif
14560int
14561main ()
14562{
14563
14564 ;
14565 return 0;
14566}
14567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014569
14570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014572
14573 have_ucs4_tcl=yes
14574
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14578$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014579
Skip Montanaro6dead952003-09-25 14:50:04 +000014580# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014581if test "$wchar_h" = yes
14582then
14583 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14585$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014586 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014588else
14589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014591 ac_cv_wchar_t_signed=yes
14592else
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014594/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014595
14596 #include <wchar.h>
14597 int main()
14598 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014599 /* Success: exit code 0 */
14600 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014601 }
14602
14603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014604if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014605 ac_cv_wchar_t_signed=yes
14606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014611fi
14612
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014613fi
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14616$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617fi
14618
Georg Brandl52d168a2008-01-07 18:10:24 +000014619# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014620if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014621 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014622then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014623 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014624
Matthias Kloseb9621712010-04-24 17:59:49 +000014625$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
Georg Brandl52d168a2008-01-07 18:10:24 +000014627else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014628 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014629fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14631$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014632
14633# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14635$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 ac_cv_c_bigendian=unknown
14640 # See if we're dealing with a universal compiler.
14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14642/* end confdefs.h. */
14643#ifndef __APPLE_CC__
14644 not a universal capable compiler
14645 #endif
14646 typedef int dummy;
14647
Skip Montanaro6dead952003-09-25 14:50:04 +000014648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_compile "$LINENO"; then :
14650
14651 # Check for potential -arch flags. It is not universal unless
14652 # there are at least two -arch flags with different values.
14653 ac_arch=
14654 ac_prev=
14655 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14656 if test -n "$ac_prev"; then
14657 case $ac_word in
14658 i?86 | x86_64 | ppc | ppc64)
14659 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14660 ac_arch=$ac_word
14661 else
14662 ac_cv_c_bigendian=universal
14663 break
14664 fi
14665 ;;
14666 esac
14667 ac_prev=
14668 elif test "x$ac_word" = "x-arch"; then
14669 ac_prev=arch
14670 fi
14671 done
14672fi
14673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14674 if test $ac_cv_c_bigendian = unknown; then
14675 # See if sys/param.h defines the BYTE_ORDER macro.
14676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014677/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014678#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014680
Martin v. Löwis11437992002-04-12 09:54:03 +000014681int
14682main ()
14683{
Matthias Kloseb9621712010-04-24 17:59:49 +000014684#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14685 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14686 && LITTLE_ENDIAN)
14687 bogus endian macros
14688 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014689
14690 ;
14691 return 0;
14692}
14693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014694if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014695 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014697/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014698#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014700
Martin v. Löwis11437992002-04-12 09:54:03 +000014701int
14702main ()
14703{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 not big endian
14706 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014707
14708 ;
14709 return 0;
14710}
14711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014712if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713 ac_cv_c_bigendian=yes
14714else
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014718fi
14719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14720 fi
14721 if test $ac_cv_c_bigendian = unknown; then
14722 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014724/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014725#include <limits.h>
14726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727int
14728main ()
14729{
Matthias Kloseb9621712010-04-24 17:59:49 +000014730#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14731 bogus endian macros
14732 #endif
14733
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 ;
14735 return 0;
14736}
14737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014738if ac_fn_c_try_compile "$LINENO"; then :
14739 # It does; now see whether it defined to _BIG_ENDIAN or not.
14740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14741/* end confdefs.h. */
14742#include <limits.h>
14743
14744int
14745main ()
14746{
14747#ifndef _BIG_ENDIAN
14748 not big endian
14749 #endif
14750
14751 ;
14752 return 0;
14753}
14754_ACEOF
14755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014757else
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14761fi
14762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14763 fi
14764 if test $ac_cv_c_bigendian = unknown; then
14765 # Compile a test program.
14766 if test "$cross_compiling" = yes; then :
14767 # Try to guess by grepping values from an object file.
14768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14769/* end confdefs.h. */
14770short int ascii_mm[] =
14771 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14772 short int ascii_ii[] =
14773 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14774 int use_ascii (int i) {
14775 return ascii_mm[i] + ascii_ii[i];
14776 }
14777 short int ebcdic_ii[] =
14778 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14779 short int ebcdic_mm[] =
14780 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14781 int use_ebcdic (int i) {
14782 return ebcdic_mm[i] + ebcdic_ii[i];
14783 }
14784 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786int
14787main ()
14788{
14789return use_ascii (foo) == use_ebcdic (foo);
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794if ac_fn_c_try_compile "$LINENO"; then :
14795 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14796 ac_cv_c_bigendian=yes
14797 fi
14798 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14799 if test "$ac_cv_c_bigendian" = unknown; then
14800 ac_cv_c_bigendian=no
14801 else
14802 # finding both strings is unlikely to happen, but who knows?
14803 ac_cv_c_bigendian=unknown
14804 fi
14805 fi
14806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014808else
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014810/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014812int
14813main ()
14814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 /* Are we little or big endian? From Harbison&Steele. */
14817 union
14818 {
14819 long int l;
14820 char c[sizeof (long int)];
14821 } u;
14822 u.l = 1;
14823 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824
14825 ;
14826 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014827}
Martin v. Löwis11437992002-04-12 09:54:03 +000014828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014829if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014830 ac_cv_c_bigendian=no
14831else
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14841$as_echo "$ac_cv_c_bigendian" >&6; }
14842 case $ac_cv_c_bigendian in #(
14843 yes)
14844 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14845;; #(
14846 no)
14847 ;; #(
14848 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 ;; #(
14853 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014854 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014855 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014857
Michael W. Hudson54241132001-12-07 15:38:26 +000014858
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014859# ABI version string for Python extension modules. This appears between the
14860# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14861# from the following attributes which affect the ABI of this Python build (in
14862# this order):
14863#
14864# * The Python implementation (always 'cpython-' for us)
14865# * The major and minor version numbers
14866# * --with-pydebug (adds a 'd')
14867# * --with-pymalloc (adds a 'm')
14868# * --with-wide-unicode (adds a 'u')
14869#
14870# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014871# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14872# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014873
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14875$as_echo_n "checking ABIFLAGS... " >&6; }
14876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14877$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14879$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014880SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14882$as_echo "$SOABI" >&6; }
14883
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014884
14885case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014886 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014887 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14888 *)
14889 EXT_SUFFIX=${SHLIB_SUFFIX};;
14890esac
14891
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14893$as_echo_n "checking LDVERSION... " >&6; }
14894LDVERSION='$(VERSION)$(ABIFLAGS)'
14895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14896$as_echo "$LDVERSION" >&6; }
14897
doko@python.org87421192013-01-26 11:39:31 +010014898
doko@ubuntu.com55532312016-06-14 08:55:19 +020014899if test x$PLATFORM_TRIPLET = x; then
14900 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14901else
14902 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14903fi
doko@python.org87421192013-01-26 11:39:31 +010014904
14905
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014906# Check whether right shifting a negative integer extends the sign bit
14907# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14909$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014910if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014912else
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014915 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014919
14920int main()
14921{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014922 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014923}
14924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014926if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014927 ac_cv_rshift_extends_sign=yes
14928else
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014933fi
14934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935fi
14936
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14938$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014939if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014940then
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014943
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014944fi
14945
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014946# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14948$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014949if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014951else
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014955#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014956int
14957main ()
14958{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014959
14960 FILE *f = fopen("/dev/null", "r");
14961 flockfile(f);
14962 getc_unlocked(f);
14963 funlockfile(f);
14964
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ;
14966 return 0;
14967}
14968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014969if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014970 ac_cv_have_getc_unlocked=yes
14971else
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 ac_cv_have_getc_unlocked=no
14973fi
14974rm -f core conftest.err conftest.$ac_objext \
14975 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14979$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014980if test "$ac_cv_have_getc_unlocked" = yes
14981then
Martin v. Löwis11437992002-04-12 09:54:03 +000014982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014984
14985fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014986
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014987# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014988# save the value of LIBS so we don't actually link Python with readline
14989LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014990
Gregory P. Smith18820942008-09-07 06:24:49 +000014991# On some systems we need to link readline to a termcap compatible
14992# library. NOTE: Keep the precedence of listed libraries synchronised
14993# with setup.py.
14994py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14996$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014997for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014998 if test -z "$py_libtermcap"; then
14999 READLINE_LIBS="-lreadline"
15000 else
15001 READLINE_LIBS="-lreadline -l$py_libtermcap"
15002 fi
15003 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015005/* end confdefs.h. */
15006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007/* Override any GCC internal prototype to avoid an error.
15008 Use char because int might match the return type of a GCC
15009 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015010#ifdef __cplusplus
15011extern "C"
15012#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015013char readline ();
15014int
15015main ()
15016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015018 ;
15019 return 0;
15020}
15021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015022if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015023 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015025rm -f core conftest.err conftest.$ac_objext \
15026 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015027 if test $py_cv_lib_readline = yes; then
15028 break
15029 fi
15030done
15031# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15032#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015033if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15035$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015036else
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15038$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015041
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015042fi
15043
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015044# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15046$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015047if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015049else
15050 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015051LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015053/* end confdefs.h. */
15054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055/* Override any GCC internal prototype to avoid an error.
15056 Use char because int might match the return type of a GCC
15057 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015058#ifdef __cplusplus
15059extern "C"
15060#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015061char rl_callback_handler_install ();
15062int
15063main ()
15064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015066 ;
15067 return 0;
15068}
15069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015071 ac_cv_lib_readline_rl_callback_handler_install=yes
15072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015075rm -f core conftest.err conftest.$ac_objext \
15076 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015077LIBS=$ac_check_lib_save_LIBS
15078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15080$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015081if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015084
15085fi
15086
15087
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015088# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015090/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015091#include <readline/readline.h>
15092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015093if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015094 have_readline=yes
15095else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015096 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015097
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015098fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015099rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015100if test $have_readline = yes
15101then
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015103/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015104#include <readline/readline.h>
15105
15106_ACEOF
15107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015111
15112fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015113rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015116/* end confdefs.h. */
15117#include <readline/readline.h>
15118
15119_ACEOF
15120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015122
Matthias Kloseb9621712010-04-24 17:59:49 +000015123$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015124
15125fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015126rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015127
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015128fi
15129
Martin v. Löwis0daad592001-09-30 21:09:59 +000015130# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15132$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015133if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015135else
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015137LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141/* Override any GCC internal prototype to avoid an error.
15142 Use char because int might match the return type of a GCC
15143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015144#ifdef __cplusplus
15145extern "C"
15146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015147char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015148int
15149main ()
15150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ;
15153 return 0;
15154}
15155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015161rm -f core conftest.err conftest.$ac_objext \
15162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015163LIBS=$ac_check_lib_save_LIBS
15164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15166$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015167if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015170
Martin v. Löwis0daad592001-09-30 21:09:59 +000015171fi
15172
Michael W. Hudson54241132001-12-07 15:38:26 +000015173
Thomas Wouters89d996e2007-09-08 17:39:28 +000015174# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15176$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015177if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015179else
15180 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015181LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015183/* end confdefs.h. */
15184
15185/* Override any GCC internal prototype to avoid an error.
15186 Use char because int might match the return type of a GCC
15187 builtin and then its argument prototype would still apply. */
15188#ifdef __cplusplus
15189extern "C"
15190#endif
15191char rl_completion_display_matches_hook ();
15192int
15193main ()
15194{
15195return rl_completion_display_matches_hook ();
15196 ;
15197 return 0;
15198}
15199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015200if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015201 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15202else
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015205rm -f core conftest.err conftest.$ac_objext \
15206 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015207LIBS=$ac_check_lib_save_LIBS
15208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15210$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015211if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015212
Matthias Kloseb9621712010-04-24 17:59:49 +000015213$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015214
15215fi
15216
15217
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015218# also in 4.0, but not in editline
15219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15220$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15221if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15222 $as_echo_n "(cached) " >&6
15223else
15224 ac_check_lib_save_LIBS=$LIBS
15225LIBS="-lreadline $READLINE_LIBS $LIBS"
15226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15227/* end confdefs.h. */
15228
15229/* Override any GCC internal prototype to avoid an error.
15230 Use char because int might match the return type of a GCC
15231 builtin and then its argument prototype would still apply. */
15232#ifdef __cplusplus
15233extern "C"
15234#endif
15235char rl_resize_terminal ();
15236int
15237main ()
15238{
15239return rl_resize_terminal ();
15240 ;
15241 return 0;
15242}
15243_ACEOF
15244if ac_fn_c_try_link "$LINENO"; then :
15245 ac_cv_lib_readline_rl_resize_terminal=yes
15246else
15247 ac_cv_lib_readline_rl_resize_terminal=no
15248fi
15249rm -f core conftest.err conftest.$ac_objext \
15250 conftest$ac_exeext conftest.$ac_ext
15251LIBS=$ac_check_lib_save_LIBS
15252fi
15253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15254$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15255if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15256
15257$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15258
15259fi
15260
15261
Martin v. Löwis0daad592001-09-30 21:09:59 +000015262# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15264$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015265if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015266 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015267else
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015269LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273/* Override any GCC internal prototype to avoid an error.
15274 Use char because int might match the return type of a GCC
15275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015276#ifdef __cplusplus
15277extern "C"
15278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015279char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015280int
15281main ()
15282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ;
15285 return 0;
15286}
15287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015288if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015290else
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015293rm -f core conftest.err conftest.$ac_objext \
15294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015295LIBS=$ac_check_lib_save_LIBS
15296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15298$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015299if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015302
Guido van Rossum353ae582001-07-10 16:45:32 +000015303fi
15304
Jack Jansendd19cf82001-12-06 22:36:17 +000015305
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015306# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015308/* end confdefs.h. */
15309#include <readline/readline.h>
15310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015311if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015312 have_readline=yes
15313else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015314 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015315
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015316fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015317rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015318if test $have_readline = yes
15319then
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015321/* end confdefs.h. */
15322#include <readline/readline.h>
15323
15324_ACEOF
15325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015329
15330fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015331rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015332
15333fi
15334
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15336$as_echo_n "checking for append_history in -lreadline... " >&6; }
15337if ${ac_cv_lib_readline_append_history+:} false; then :
15338 $as_echo_n "(cached) " >&6
15339else
15340 ac_check_lib_save_LIBS=$LIBS
15341LIBS="-lreadline $READLINE_LIBS $LIBS"
15342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15343/* end confdefs.h. */
15344
15345/* Override any GCC internal prototype to avoid an error.
15346 Use char because int might match the return type of a GCC
15347 builtin and then its argument prototype would still apply. */
15348#ifdef __cplusplus
15349extern "C"
15350#endif
15351char append_history ();
15352int
15353main ()
15354{
15355return append_history ();
15356 ;
15357 return 0;
15358}
15359_ACEOF
15360if ac_fn_c_try_link "$LINENO"; then :
15361 ac_cv_lib_readline_append_history=yes
15362else
15363 ac_cv_lib_readline_append_history=no
15364fi
15365rm -f core conftest.err conftest.$ac_objext \
15366 conftest$ac_exeext conftest.$ac_ext
15367LIBS=$ac_check_lib_save_LIBS
15368fi
15369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15370$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15371if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15372
15373$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15374
15375fi
15376
15377
Martin v. Löwis82bca632006-02-10 20:49:30 +000015378# End of readline checks: restore LIBS
15379LIBS=$LIBS_no_readline
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15382$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015383if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015385else
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015388 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015391/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015392
15393int main()
15394{
15395 int val1 = nice(1);
15396 if (val1 != -1 && val1 == nice(2))
15397 exit(0);
15398 exit(1);
15399}
15400
Martin v. Löwis11437992002-04-12 09:54:03 +000015401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015402if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015403 ac_cv_broken_nice=yes
15404else
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15408 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015409fi
15410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411fi
15412
Matthias Kloseb9621712010-04-24 17:59:49 +000015413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15414$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015415if test "$ac_cv_broken_nice" = yes
15416then
Martin v. Löwis11437992002-04-12 09:54:03 +000015417
Matthias Kloseb9621712010-04-24 17:59:49 +000015418$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015419
15420fi
15421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15423$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015424if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015426else
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015428 ac_cv_broken_poll=no
15429else
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015431/* end confdefs.h. */
15432
15433#include <poll.h>
15434
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015435int main()
15436{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015437 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015438 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015439
15440 close (42);
15441
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015442 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015443 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015444 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015445 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015446 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015447 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015448 return 1;
15449}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015450
15451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015452if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015453 ac_cv_broken_poll=yes
15454else
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015461fi
15462
Matthias Kloseb9621712010-04-24 17:59:49 +000015463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15464$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015465if test "$ac_cv_broken_poll" = yes
15466then
15467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015469
15470fi
15471
Brett Cannon43802422005-02-10 20:48:03 +000015472# 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 +000015473# (which is not required by ISO C or UNIX spec) and/or if we support
15474# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015475ac_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 +000015476#include <$ac_cv_struct_tm>
15477
Matthias Kloseb9621712010-04-24 17:59:49 +000015478"
Victor Stinnere0be4232011-10-25 13:06:09 +020015479if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015480
15481cat >>confdefs.h <<_ACEOF
15482#define HAVE_STRUCT_TM_TM_ZONE 1
15483_ACEOF
15484
15485
15486fi
15487
15488if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015491
15492else
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15494"
Victor Stinnere0be4232011-10-25 13:06:09 +020015495if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497else
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015499fi
15500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015502#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015503_ACEOF
15504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15506$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015507if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509else
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015511/* end confdefs.h. */
15512#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015513#if !HAVE_DECL_TZNAME
15514extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015515#endif
15516
15517int
15518main ()
15519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015521 ;
15522 return 0;
15523}
15524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015525if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015526 ac_cv_var_tzname=yes
15527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015530rm -f core conftest.err conftest.$ac_objext \
15531 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15534$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015535 if test $ac_cv_var_tzname = yes; then
15536
Matthias Kloseb9621712010-04-24 17:59:49 +000015537$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015538
15539 fi
15540fi
15541
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015542
Martin v. Löwis1d459062005-03-14 21:23:33 +000015543# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15545$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015546if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015548else
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015551 ac_cv_working_tzset=no
15552else
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015554/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015555
15556#include <stdlib.h>
15557#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015558#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015559
15560#if HAVE_TZNAME
15561extern char *tzname[];
15562#endif
15563
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015564int main()
15565{
Brett Cannon18367812003-09-19 00:59:16 +000015566 /* Note that we need to ensure that not only does tzset(3)
15567 do 'something' with localtime, but it works as documented
15568 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015569 This includes making sure that tzname is set properly if
15570 tm->tm_zone does not exist since it is the alternative way
15571 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015572
15573 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015574 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015575 */
15576
Martin v. Löwis1d459062005-03-14 21:23:33 +000015577 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015578 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15579
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015580 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015581 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015582 if (localtime(&groundhogday)->tm_hour != 0)
15583 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015584#if HAVE_TZNAME
15585 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15586 if (strcmp(tzname[0], "UTC") ||
15587 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15588 exit(1);
15589#endif
Brett Cannon18367812003-09-19 00:59:16 +000015590
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015591 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015592 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015593 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015594 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015595#if HAVE_TZNAME
15596 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15597 exit(1);
15598#endif
Brett Cannon18367812003-09-19 00:59:16 +000015599
15600 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15601 tzset();
15602 if (localtime(&groundhogday)->tm_hour != 11)
15603 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015604#if HAVE_TZNAME
15605 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15606 exit(1);
15607#endif
15608
15609#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015610 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15611 exit(1);
15612 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15613 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015614#endif
Brett Cannon18367812003-09-19 00:59:16 +000015615
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015616 exit(0);
15617}
15618
15619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015620if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015621 ac_cv_working_tzset=yes
15622else
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015627fi
15628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629fi
15630
Matthias Kloseb9621712010-04-24 17:59:49 +000015631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15632$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015633if test "$ac_cv_working_tzset" = yes
15634then
15635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015637
15638fi
15639
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015640# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15642$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015643if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015645else
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015647/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015648#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015649int
15650main ()
15651{
15652
15653struct stat st;
15654st.st_mtim.tv_nsec = 1;
15655
15656 ;
15657 return 0;
15658}
15659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015661 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015662else
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15666fi
15667
Matthias Kloseb9621712010-04-24 17:59:49 +000015668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15669$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015670if test "$ac_cv_stat_tv_nsec" = yes
15671then
15672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015674
15675fi
15676
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015677# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15679$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015680if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015682else
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015684/* end confdefs.h. */
15685#include <sys/stat.h>
15686int
15687main ()
15688{
15689
15690struct stat st;
15691st.st_mtimespec.tv_nsec = 1;
15692
15693 ;
15694 return 0;
15695}
15696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015698 ac_cv_stat_tv_nsec2=yes
15699else
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15703fi
15704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15706$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015707if test "$ac_cv_stat_tv_nsec2" = yes
15708then
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015711
15712fi
15713
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015714# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015715ac_save_cppflags="$CPPFLAGS"
15716CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015717
15718for ac_header in curses.h ncurses.h
15719do :
15720 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15721ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15722if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15723 cat >>confdefs.h <<_ACEOF
15724#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15725_ACEOF
15726
15727fi
15728
15729done
15730
15731
15732# On Solaris, term.h requires curses.h
15733for ac_header in term.h
15734do :
15735 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15736#ifdef HAVE_CURSES_H
15737#include <curses.h>
15738#endif
15739
15740"
15741if test "x$ac_cv_header_term_h" = xyes; then :
15742 cat >>confdefs.h <<_ACEOF
15743#define HAVE_TERM_H 1
15744_ACEOF
15745
15746fi
15747
15748done
15749
15750
Jack Jansen666b1e72001-10-31 12:11:48 +000015751# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15753$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015754if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015758/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015759#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015760int
15761main ()
15762{
Jack Jansen666b1e72001-10-31 12:11:48 +000015763
15764 int rtn;
15765 rtn = mvwdelch(0,0,0);
15766
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ;
15768 return 0;
15769}
15770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015771if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015772 ac_cv_mvwdelch_is_expression=yes
15773else
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15777fi
15778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15780$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015781
15782if test "$ac_cv_mvwdelch_is_expression" = yes
15783then
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015786
15787fi
15788
Matthias Kloseb9621712010-04-24 17:59:49 +000015789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15790$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015791if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015793else
Matthias Kloseb9621712010-04-24 17:59:49 +000015794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015795/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015796#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015797int
15798main ()
15799{
Jack Jansen666b1e72001-10-31 12:11:48 +000015800
15801 WINDOW *w;
15802 w->_flags = 0;
15803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 ;
15805 return 0;
15806}
15807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015808if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015809 ac_cv_window_has_flags=yes
15810else
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15814fi
15815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15817$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015818
Jack Jansen666b1e72001-10-31 12:11:48 +000015819
15820if test "$ac_cv_window_has_flags" = yes
15821then
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015824
15825fi
15826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15828$as_echo_n "checking for is_term_resized... " >&6; }
15829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015830/* end confdefs.h. */
15831#include <curses.h>
15832int
15833main ()
15834{
15835void *x=is_term_resized
15836 ;
15837 return 0;
15838}
15839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015843
Matthias Kloseb159a552010-04-25 21:00:44 +000015844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015845$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015846else
Matthias Kloseb9621712010-04-24 17:59:49 +000015847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15848$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015849
15850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15854$as_echo_n "checking for resize_term... " >&6; }
15855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015856/* end confdefs.h. */
15857#include <curses.h>
15858int
15859main ()
15860{
15861void *x=resize_term
15862 ;
15863 return 0;
15864}
15865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015866if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015869
Matthias Kloseb159a552010-04-25 21:00:44 +000015870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015871$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015872else
Matthias Kloseb9621712010-04-24 17:59:49 +000015873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15874$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015875
15876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15880$as_echo_n "checking for resizeterm... " >&6; }
15881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015882/* end confdefs.h. */
15883#include <curses.h>
15884int
15885main ()
15886{
15887void *x=resizeterm
15888 ;
15889 return 0;
15890}
15891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015892if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015893
Matthias Kloseb9621712010-04-24 17:59:49 +000015894$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015895
Matthias Kloseb159a552010-04-25 21:00:44 +000015896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015897$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015898else
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15900$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015901
15902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015904# last curses configure check
15905CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15908$as_echo "$as_me: checking for device files" >&6;}
15909
15910if test "x$cross_compiling" = xyes; then
15911 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15913$as_echo_n "checking for /dev/ptmx... " >&6; }
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15915$as_echo "not set" >&6; }
15916 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15917 fi
15918 if test "${ac_cv_file__dev_ptc+set}" != set; then
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15920$as_echo_n "checking for /dev/ptc... " >&6; }
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15922$as_echo "not set" >&6; }
15923 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15924 fi
15925fi
15926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15928$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015929if ${ac_cv_file__dev_ptmx+:} false; then :
15930 $as_echo_n "(cached) " >&6
15931else
15932 test "$cross_compiling" = yes &&
15933 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15934if test -r "/dev/ptmx"; then
15935 ac_cv_file__dev_ptmx=yes
15936else
15937 ac_cv_file__dev_ptmx=no
15938fi
15939fi
15940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15941$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15942if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015943
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015944fi
15945
15946if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015949
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15952$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015953if ${ac_cv_file__dev_ptc+:} false; then :
15954 $as_echo_n "(cached) " >&6
15955else
15956 test "$cross_compiling" = yes &&
15957 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15958if test -r "/dev/ptc"; then
15959 ac_cv_file__dev_ptc=yes
15960else
15961 ac_cv_file__dev_ptc=no
15962fi
15963fi
15964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15965$as_echo "$ac_cv_file__dev_ptc" >&6; }
15966if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015967
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015968fi
15969
15970if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015973
Neal Norwitz865400f2003-03-21 01:42:58 +000015974fi
15975
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015976if test $ac_sys_system = Darwin
15977then
15978 LIBS="$LIBS -framework CoreFoundation"
15979fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15982$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015983if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015985else
Matthias Kloseb9621712010-04-24 17:59:49 +000015986 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015987 ac_cv_have_size_t_format="cross -- assuming yes"
15988
Thomas Wouters477c8d52006-05-27 19:21:47 +000015989else
Matthias Kloseb9621712010-04-24 17:59:49 +000015990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015991/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015992
Thomas Wouters477c8d52006-05-27 19:21:47 +000015993#include <stdio.h>
15994#include <stddef.h>
15995#include <string.h>
15996
Christian Heimes2c181612007-12-17 20:04:13 +000015997#ifdef HAVE_SYS_TYPES_H
15998#include <sys/types.h>
15999#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016000
16001#ifdef HAVE_SSIZE_T
16002typedef ssize_t Py_ssize_t;
16003#elif SIZEOF_VOID_P == SIZEOF_LONG
16004typedef long Py_ssize_t;
16005#else
16006typedef int Py_ssize_t;
16007#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016008
Christian Heimes2c181612007-12-17 20:04:13 +000016009int main()
16010{
16011 char buffer[256];
16012
Thomas Wouters477c8d52006-05-27 19:21:47 +000016013 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16014 return 1;
16015
Thomas Wouters89f507f2006-12-13 04:49:30 +000016016 if (strcmp(buffer, "123"))
16017 return 1;
16018
16019 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16020 return 1;
16021
16022 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016023 return 1;
16024
16025 return 0;
16026}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016027
Thomas Wouters477c8d52006-05-27 19:21:47 +000016028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016029if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016030 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016031else
Matthias Kloseb9621712010-04-24 17:59:49 +000016032 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016036fi
16037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16040$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016041if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016044
16045fi
16046
Matthias Kloseb9621712010-04-24 17:59:49 +000016047ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016048#ifdef HAVE_SYS_TYPES_H
16049#include <sys/types.h>
16050#endif
16051#ifdef HAVE_SYS_SOCKET_H
16052#include <sys/socket.h>
16053#endif
16054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055"
Victor Stinnere0be4232011-10-25 13:06:09 +020016056if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016057
Martin v. Löwis11437992002-04-12 09:54:03 +000016058else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016059
Matthias Kloseb9621712010-04-24 17:59:49 +000016060$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016061
16062fi
16063
Michael W. Hudson54241132001-12-07 15:38:26 +000016064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16066$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016067if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016068 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016069else
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016071 ac_cv_broken_mbstowcs=no
16072else
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016074/* end confdefs.h. */
16075
Stefan Krah19c21392012-11-22 23:47:32 +010016076#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016077#include<stdlib.h>
16078int main() {
16079 size_t len = -1;
16080 const char *str = "text";
16081 len = mbstowcs(NULL, str, 0);
16082 return (len != 4);
16083}
16084
16085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016086if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016087 ac_cv_broken_mbstowcs=no
16088else
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016093fi
16094
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016095fi
16096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16098$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016099if test "$ac_cv_broken_mbstowcs" = yes
16100then
16101
Matthias Kloseb9621712010-04-24 17:59:49 +000016102$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016103
16104fi
16105
Antoine Pitroub52ec782009-01-25 16:34:23 +000016106# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16108$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016109
16110# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016111if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016112 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016113if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016114then
16115
Matthias Kloseb9621712010-04-24 17:59:49 +000016116$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16119$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016120fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016121if test "$withval" = no
16122then
16123
16124$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16125
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16127$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016128fi
16129
Antoine Pitrou042b1282010-08-13 21:15:58 +000016130else
16131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16132$as_echo "no value specified" >&6; }
16133fi
16134
Antoine Pitroub52ec782009-01-25 16:34:23 +000016135
Matthias Kloseb17289e2012-03-15 19:51:34 +010016136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16137$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16138if ${ac_cv_computed_gotos+:} false; then :
16139 $as_echo_n "(cached) " >&6
16140else
16141 if test "$cross_compiling" = yes; then :
16142 if test "${with_computed_gotos+set}" = set; then
16143 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16144 else
16145 ac_cv_computed_gotos=no
16146 fi
16147else
16148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16149/* end confdefs.h. */
16150
16151int main(int argc, char **argv)
16152{
16153 static void *targets[1] = { &&LABEL1 };
16154 goto LABEL2;
16155LABEL1:
16156 return 0;
16157LABEL2:
16158 goto *targets[0];
16159 return 1;
16160}
16161
16162_ACEOF
16163if ac_fn_c_try_run "$LINENO"; then :
16164 ac_cv_computed_gotos=yes
16165else
16166 ac_cv_computed_gotos=no
16167fi
16168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16169 conftest.$ac_objext conftest.beam conftest.$ac_ext
16170fi
16171
16172fi
16173
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16175$as_echo "$ac_cv_computed_gotos" >&6; }
16176case "$ac_cv_computed_gotos" in yes*)
16177
16178$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16179
16180esac
16181
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016182case $ac_sys_system in
16183AIX*)
16184
16185$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16186 ;;
16187esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016188
Michael W. Hudson54241132001-12-07 15:38:26 +000016189
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016190
16191
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016192for h in `(cd $srcdir;echo Python/thread_*.h)`
16193do
16194 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16195done
16196
Michael W. Hudson54241132001-12-07 15:38:26 +000016197
Ned Deily0db50cf2014-07-25 12:41:31 -070016198SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16200$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016201for dir in $SRCDIRS; do
16202 if test ! -d $dir; then
16203 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016204 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016205done
Matthias Kloseb9621712010-04-24 17:59:49 +000016206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16207$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016208
Stefan Krah1919b7e2012-03-21 18:25:23 +010016209# Availability of -O2:
16210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16211$as_echo_n "checking for -O2... " >&6; }
16212saved_cflags="$CFLAGS"
16213CFLAGS="-O2"
16214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16215/* end confdefs.h. */
16216
16217int
16218main ()
16219{
16220
16221
16222 ;
16223 return 0;
16224}
16225_ACEOF
16226if ac_fn_c_try_compile "$LINENO"; then :
16227 have_O2=yes
16228else
16229 have_O2=no
16230fi
16231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16233$as_echo "$have_O2" >&6; }
16234CFLAGS="$saved_cflags"
16235
16236# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16237# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16239$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16240saved_cflags="$CFLAGS"
16241CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16242if test "$have_O2" = no; then
16243 CFLAGS=""
16244fi
16245if test "$cross_compiling" = yes; then :
16246 have_glibc_memmove_bug=undefined
16247else
16248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249/* end confdefs.h. */
16250
16251#include <stdio.h>
16252#include <stdlib.h>
16253#include <string.h>
16254void foo(void *p, void *q) { memmove(p, q, 19); }
16255int main() {
16256 char a[32] = "123456789000000000";
16257 foo(&a[9], a);
16258 if (strcmp(a, "123456789123456789000000000") != 0)
16259 return 1;
16260 foo(a, &a[9]);
16261 if (strcmp(a, "123456789000000000") != 0)
16262 return 1;
16263 return 0;
16264}
16265
16266_ACEOF
16267if ac_fn_c_try_run "$LINENO"; then :
16268 have_glibc_memmove_bug=no
16269else
16270 have_glibc_memmove_bug=yes
16271fi
16272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16273 conftest.$ac_objext conftest.beam conftest.$ac_ext
16274fi
16275
16276CFLAGS="$saved_cflags"
16277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16278$as_echo "$have_glibc_memmove_bug" >&6; }
16279if test "$have_glibc_memmove_bug" = yes; then
16280
16281$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16282
16283fi
16284
16285if test "$have_gcc_asm_for_x87" = yes; then
16286 # Some versions of gcc miscompile inline asm:
16287 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16288 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16289 case $CC in
16290 *gcc*)
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16292$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16293 saved_cflags="$CFLAGS"
16294 CFLAGS="-O2"
16295 if test "$cross_compiling" = yes; then :
16296 have_ipa_pure_const_bug=undefined
16297else
16298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16299/* end confdefs.h. */
16300
16301 __attribute__((noinline)) int
16302 foo(int *p) {
16303 int r;
16304 asm ( "movl \$6, (%1)\n\t"
16305 "xorl %0, %0\n\t"
16306 : "=r" (r) : "r" (p) : "memory"
16307 );
16308 return r;
16309 }
16310 int main() {
16311 int p = 8;
16312 if ((foo(&p) ? : p) != 6)
16313 return 1;
16314 return 0;
16315 }
16316
16317_ACEOF
16318if ac_fn_c_try_run "$LINENO"; then :
16319 have_ipa_pure_const_bug=no
16320else
16321 have_ipa_pure_const_bug=yes
16322fi
16323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16324 conftest.$ac_objext conftest.beam conftest.$ac_ext
16325fi
16326
16327 CFLAGS="$saved_cflags"
16328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16329$as_echo "$have_ipa_pure_const_bug" >&6; }
16330 if test "$have_ipa_pure_const_bug" = yes; then
16331
16332$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16333
16334 fi
16335 ;;
16336 esac
16337fi
16338
Victor Stinner4f5366e2015-01-09 02:13:19 +010016339# Check for stdatomic.h
16340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16341$as_echo_n "checking for stdatomic.h... " >&6; }
16342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16343/* end confdefs.h. */
16344
16345
16346 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016347 atomic_int value = ATOMIC_VAR_INIT(1);
16348 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016349 int main() {
16350 int loaded_value = atomic_load(&value);
16351 return 0;
16352 }
16353
16354
16355_ACEOF
16356if ac_fn_c_try_link "$LINENO"; then :
16357 have_stdatomic_h=yes
16358else
16359 have_stdatomic_h=no
16360fi
16361rm -f core conftest.err conftest.$ac_objext \
16362 conftest$ac_exeext conftest.$ac_ext
16363
16364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16365$as_echo "$have_stdatomic_h" >&6; }
16366
16367if test "$have_stdatomic_h" = yes; then
16368
16369$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16370
16371fi
16372
16373# Check for GCC >= 4.7 __atomic builtins
16374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16375$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16377/* end confdefs.h. */
16378
16379
16380 volatile int val = 1;
16381 int main() {
16382 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16383 return 0;
16384 }
16385
16386
16387_ACEOF
16388if ac_fn_c_try_link "$LINENO"; then :
16389 have_builtin_atomic=yes
16390else
16391 have_builtin_atomic=no
16392fi
16393rm -f core conftest.err conftest.$ac_objext \
16394 conftest$ac_exeext conftest.$ac_ext
16395
16396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16397$as_echo "$have_builtin_atomic" >&6; }
16398
16399if test "$have_builtin_atomic" = yes; then
16400
16401$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16402
16403fi
16404
Ned Deily322f5ba2013-11-21 23:01:59 -080016405# ensurepip option
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16407$as_echo_n "checking for ensurepip... " >&6; }
16408
16409# Check whether --with-ensurepip was given.
16410if test "${with_ensurepip+set}" = set; then :
16411 withval=$with_ensurepip;
16412else
16413 with_ensurepip=upgrade
16414fi
16415
16416case $with_ensurepip in #(
16417 yes|upgrade) :
16418 ENSUREPIP=upgrade ;; #(
16419 install) :
16420 ENSUREPIP=install ;; #(
16421 no) :
16422 ENSUREPIP=no ;; #(
16423 *) :
16424 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16425esac
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16427$as_echo "$ENSUREPIP" >&6; }
16428
16429
Victor Stinner35a97c02015-03-08 02:59:09 +010016430# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16432$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16434/* end confdefs.h. */
16435
16436
16437 #include <dirent.h>
16438
16439 int main() {
16440 struct dirent entry;
16441 return entry.d_type == DT_UNKNOWN;
16442 }
16443
16444
16445_ACEOF
16446if ac_fn_c_try_link "$LINENO"; then :
16447 have_dirent_d_type=yes
16448else
16449 have_dirent_d_type=no
16450fi
16451rm -f core conftest.err conftest.$ac_objext \
16452 conftest$ac_exeext conftest.$ac_ext
16453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16454$as_echo "$have_dirent_d_type" >&6; }
16455
16456if test "$have_dirent_d_type" = yes; then
16457
16458$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16459
16460fi
16461
Victor Stinner9eb57c52015-03-19 22:21:49 +010016462# check if the Linux getrandom() syscall is available
16463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16464$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16466/* end confdefs.h. */
16467
16468
Victor Stinner1b80b242016-04-12 22:34:58 +020016469 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016470 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016471 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016472
16473 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016474 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016475 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016476 const int flags = GRND_NONBLOCK;
16477 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016478 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016479 return 0;
16480 }
16481
16482
16483_ACEOF
16484if ac_fn_c_try_link "$LINENO"; then :
16485 have_getrandom_syscall=yes
16486else
16487 have_getrandom_syscall=no
16488fi
16489rm -f core conftest.err conftest.$ac_objext \
16490 conftest$ac_exeext conftest.$ac_ext
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16492$as_echo "$have_getrandom_syscall" >&6; }
16493
16494if test "$have_getrandom_syscall" = yes; then
16495
16496$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16497
16498fi
16499
Victor Stinner3abf44e2015-09-18 15:38:37 +020016500# check if the getrandom() function is available
16501# the test was written for the Solaris function of <sys/random.h>
16502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16503$as_echo_n "checking for the getrandom() function... " >&6; }
16504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16505/* end confdefs.h. */
16506
16507
16508 #include <sys/random.h>
16509
16510 int main() {
16511 char buffer[1];
16512 const size_t buflen = sizeof(buffer);
16513 const int flags = 0;
16514 /* ignore the result, Python checks for ENOSYS at runtime */
16515 (void)getrandom(buffer, buflen, flags);
16516 return 0;
16517 }
16518
16519
16520_ACEOF
16521if ac_fn_c_try_link "$LINENO"; then :
16522 have_getrandom=yes
16523else
16524 have_getrandom=no
16525fi
16526rm -f core conftest.err conftest.$ac_objext \
16527 conftest$ac_exeext conftest.$ac_ext
16528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16529$as_echo "$have_getrandom" >&6; }
16530
16531if test "$have_getrandom" = yes; then
16532
16533$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16534
16535fi
16536
Guido van Rossum627b2d71993-12-24 10:39:16 +000016537# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016538ac_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 +000016539
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016540ac_config_files="$ac_config_files Modules/ld_so_aix"
16541
Martin v. Löwis11437992002-04-12 09:54:03 +000016542cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016543# This file is a shell script that caches the results of configure
16544# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016545# scripts and configure runs, see configure's option --config-cache.
16546# It is not useful on other systems. If it contains results you don't
16547# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016548#
Martin v. Löwis11437992002-04-12 09:54:03 +000016549# config.status only pays attention to the cache file if you give it
16550# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016551#
Skip Montanaro6dead952003-09-25 14:50:04 +000016552# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016553# loading this file, other *unset* `ac_cv_foo' will be assigned the
16554# following values.
16555
16556_ACEOF
16557
Guido van Rossumf78abae1997-01-21 22:02:36 +000016558# The following way of writing the cache mishandles newlines in values,
16559# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016561# Ultrix sh set writes to stderr and can't be redirected directly,
16562# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016563(
16564 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16565 eval ac_val=\$$ac_var
16566 case $ac_val in #(
16567 *${as_nl}*)
16568 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16570$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571 esac
16572 case $ac_var in #(
16573 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16575 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 esac ;;
16577 esac
16578 done
16579
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16582 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016583 # `set' does not quote correctly, so add quotes: double-quote
16584 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016586 "s/'/'\\\\''/g;
16587 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 *)
16590 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016593 esac |
16594 sort
16595) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016600 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16601 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16603 :end' >>confcache
16604if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16605 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016606 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016607 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16608$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016609 if test ! -f "$cache_file" || test -h "$cache_file"; then
16610 cat confcache >"$cache_file"
16611 else
16612 case $cache_file in #(
16613 */* | ?:*)
16614 mv -f confcache "$cache_file"$$ &&
16615 mv -f "$cache_file"$$ "$cache_file" ;; #(
16616 *)
16617 mv -f confcache "$cache_file" ;;
16618 esac
16619 fi
16620 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016621 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016622 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16623$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016624 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016625fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016626rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016627
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016628test "x$prefix" = xNONE && prefix=$ac_default_prefix
16629# Let make expand exec_prefix.
16630test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016632DEFS=-DHAVE_CONFIG_H
16633
Skip Montanaro6dead952003-09-25 14:50:04 +000016634ac_libobjs=
16635ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016636U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016637for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16638 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16642 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016643 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16644 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016645done
16646LIBOBJS=$ac_libobjs
16647
16648LTLIBOBJS=$ac_ltlibobjs
16649
16650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651
Matthias Kloseb9621712010-04-24 17:59:49 +000016652
Victor Stinnere0be4232011-10-25 13:06:09 +020016653: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016654ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016655ac_clean_files_save=$ac_clean_files
16656ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016657{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16658$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16659as_write_fail=0
16660cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016661#! $SHELL
16662# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016663# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016664# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016665# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016666
Martin v. Löwis11437992002-04-12 09:54:03 +000016667debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016668ac_cs_recheck=false
16669ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016670
Matthias Kloseb9621712010-04-24 17:59:49 +000016671SHELL=\${CONFIG_SHELL-$SHELL}
16672export SHELL
16673_ASEOF
16674cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16675## -------------------- ##
16676## M4sh Initialization. ##
16677## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679# Be more Bourne compatible
16680DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016681if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 emulate sh
16683 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016684 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016685 # is contrary to our usage. Disable this feature.
16686 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016688else
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 case `(set -o) 2>/dev/null` in #(
16690 *posix*) :
16691 set -o posix ;; #(
16692 *) :
16693 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016695fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016696
16697
Matthias Kloseb9621712010-04-24 17:59:49 +000016698as_nl='
16699'
16700export as_nl
16701# Printing a long string crashes Solaris 7 /usr/bin/printf.
16702as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16703as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16704as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16705# Prefer a ksh shell builtin over an external printf program on Solaris,
16706# but without wasting forks for bash or zsh.
16707if test -z "$BASH_VERSION$ZSH_VERSION" \
16708 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16709 as_echo='print -r --'
16710 as_echo_n='print -rn --'
16711elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16712 as_echo='printf %s\n'
16713 as_echo_n='printf %s'
16714else
16715 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16716 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16717 as_echo_n='/usr/ucb/echo -n'
16718 else
16719 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16720 as_echo_n_body='eval
16721 arg=$1;
16722 case $arg in #(
16723 *"$as_nl"*)
16724 expr "X$arg" : "X\\(.*\\)$as_nl";
16725 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16726 esac;
16727 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16728 '
16729 export as_echo_n_body
16730 as_echo_n='sh -c $as_echo_n_body as_echo'
16731 fi
16732 export as_echo_body
16733 as_echo='sh -c $as_echo_body as_echo'
16734fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016735
16736# The user is always right.
16737if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016738 PATH_SEPARATOR=:
16739 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16740 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16741 PATH_SEPARATOR=';'
16742 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745
16746# IFS
16747# We need space, tab and new line, in precisely that order. Quoting is
16748# there to prevent editors from complaining about space-tab.
16749# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16750# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751IFS=" "" $as_nl"
16752
16753# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016754as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016755case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756 *[\\/]* ) as_myself=$0 ;;
16757 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016758for as_dir in $PATH
16759do
16760 IFS=$as_save_IFS
16761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016762 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16763 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766 ;;
16767esac
16768# We did not find ourselves, most probably we were run as `sh COMMAND'
16769# in which case we are not to be found in the path.
16770if test "x$as_myself" = x; then
16771 as_myself=$0
16772fi
16773if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016774 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16775 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776fi
16777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778# Unset variables that we do not need and which cause bugs (e.g. in
16779# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16780# suppresses any "Segmentation fault" message there. '((' could
16781# trigger a bug in pdksh 5.2.14.
16782for as_var in BASH_ENV ENV MAIL MAILPATH
16783do eval test x\${$as_var+set} = xset \
16784 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785done
16786PS1='$ '
16787PS2='> '
16788PS4='+ '
16789
16790# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016791LC_ALL=C
16792export LC_ALL
16793LANGUAGE=C
16794export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016795
Matthias Kloseb9621712010-04-24 17:59:49 +000016796# CDPATH.
16797(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16798
16799
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016800# as_fn_error STATUS ERROR [LINENO LOG_FD]
16801# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016802# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16803# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016804# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016805as_fn_error ()
16806{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016807 as_status=$1; test $as_status -eq 0 && as_status=1
16808 if test "$4"; then
16809 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16810 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016811 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016812 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016813 as_fn_exit $as_status
16814} # as_fn_error
16815
16816
16817# as_fn_set_status STATUS
16818# -----------------------
16819# Set $? to STATUS, without forking.
16820as_fn_set_status ()
16821{
16822 return $1
16823} # as_fn_set_status
16824
16825# as_fn_exit STATUS
16826# -----------------
16827# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16828as_fn_exit ()
16829{
16830 set +e
16831 as_fn_set_status $1
16832 exit $1
16833} # as_fn_exit
16834
16835# as_fn_unset VAR
16836# ---------------
16837# Portably unset VAR.
16838as_fn_unset ()
16839{
16840 { eval $1=; unset $1;}
16841}
16842as_unset=as_fn_unset
16843# as_fn_append VAR VALUE
16844# ----------------------
16845# Append the text in VALUE to the end of the definition contained in VAR. Take
16846# advantage of any shell optimizations that allow amortized linear growth over
16847# repeated appends, instead of the typical quadratic growth present in naive
16848# implementations.
16849if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16850 eval 'as_fn_append ()
16851 {
16852 eval $1+=\$2
16853 }'
16854else
16855 as_fn_append ()
16856 {
16857 eval $1=\$$1\$2
16858 }
16859fi # as_fn_append
16860
16861# as_fn_arith ARG...
16862# ------------------
16863# Perform arithmetic evaluation on the ARGs, and store the result in the
16864# global $as_val. Take advantage of shells that can avoid forks. The arguments
16865# must be portable across $(()) and expr.
16866if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16867 eval 'as_fn_arith ()
16868 {
16869 as_val=$(( $* ))
16870 }'
16871else
16872 as_fn_arith ()
16873 {
16874 as_val=`expr "$@" || test $? -eq 1`
16875 }
16876fi # as_fn_arith
16877
16878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879if expr a : '\(a\)' >/dev/null 2>&1 &&
16880 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16881 as_expr=expr
16882else
16883 as_expr=false
16884fi
16885
16886if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16887 as_basename=basename
16888else
16889 as_basename=false
16890fi
16891
Matthias Kloseb9621712010-04-24 17:59:49 +000016892if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16893 as_dirname=dirname
16894else
16895 as_dirname=false
16896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898as_me=`$as_basename -- "$0" ||
16899$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16900 X"$0" : 'X\(//\)$' \| \
16901 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016902$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 sed '/^.*\/\([^/][^/]*\)\/*$/{
16904 s//\1/
16905 q
16906 }
16907 /^X\/\(\/\/\)$/{
16908 s//\1/
16909 q
16910 }
16911 /^X\/\(\/\).*/{
16912 s//\1/
16913 q
16914 }
16915 s/.*/./; q'`
16916
Matthias Kloseb9621712010-04-24 17:59:49 +000016917# Avoid depending upon Character Ranges.
16918as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16919as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16920as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16921as_cr_digits='0123456789'
16922as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923
16924ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016925case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016926-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016927 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016929 xy) ECHO_C='\c';;
16930 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16931 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932 esac;;
16933*)
16934 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016936
Martin v. Löwis11437992002-04-12 09:54:03 +000016937rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938if test -d conf$$.dir; then
16939 rm -f conf$$.dir/conf$$.file
16940else
16941 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016944if (echo >conf$$.file) 2>/dev/null; then
16945 if ln -s conf$$.file conf$$ 2>/dev/null; then
16946 as_ln_s='ln -s'
16947 # ... but there are two gotchas:
16948 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16949 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016950 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016951 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016952 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016953 elif ln conf$$.file conf$$ 2>/dev/null; then
16954 as_ln_s=ln
16955 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016956 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016957 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016958else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016959 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16962rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016963
Matthias Kloseb9621712010-04-24 17:59:49 +000016964
16965# as_fn_mkdir_p
16966# -------------
16967# Create "$as_dir" as a directory, including parents if necessary.
16968as_fn_mkdir_p ()
16969{
16970
16971 case $as_dir in #(
16972 -*) as_dir=./$as_dir;;
16973 esac
16974 test -d "$as_dir" || eval $as_mkdir_p || {
16975 as_dirs=
16976 while :; do
16977 case $as_dir in #(
16978 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16979 *) as_qdir=$as_dir;;
16980 esac
16981 as_dirs="'$as_qdir' $as_dirs"
16982 as_dir=`$as_dirname -- "$as_dir" ||
16983$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16984 X"$as_dir" : 'X\(//\)[^/]' \| \
16985 X"$as_dir" : 'X\(//\)$' \| \
16986 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16987$as_echo X"$as_dir" |
16988 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16989 s//\1/
16990 q
16991 }
16992 /^X\(\/\/\)[^/].*/{
16993 s//\1/
16994 q
16995 }
16996 /^X\(\/\/\)$/{
16997 s//\1/
16998 q
16999 }
17000 /^X\(\/\).*/{
17001 s//\1/
17002 q
17003 }
17004 s/.*/./; q'`
17005 test -d "$as_dir" && break
17006 done
17007 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017008 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017009
17010
17011} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017012if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017013 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017014else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017015 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017016 as_mkdir_p=false
17017fi
17018
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017019
17020# as_fn_executable_p FILE
17021# -----------------------
17022# Test if FILE is an executable regular file.
17023as_fn_executable_p ()
17024{
17025 test -f "$1" && test -x "$1"
17026} # as_fn_executable_p
17027as_test_x='test -x'
17028as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017029
17030# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017031as_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 +000017032
17033# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017034as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017035
17036
Martin v. Löwis11437992002-04-12 09:54:03 +000017037exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017038## ----------------------------------- ##
17039## Main body of $CONFIG_STATUS script. ##
17040## ----------------------------------- ##
17041_ASEOF
17042test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017043
Matthias Kloseb9621712010-04-24 17:59:49 +000017044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17045# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017046# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047# values after options handling.
17048ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017049This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017050generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
17052 CONFIG_FILES = $CONFIG_FILES
17053 CONFIG_HEADERS = $CONFIG_HEADERS
17054 CONFIG_LINKS = $CONFIG_LINKS
17055 CONFIG_COMMANDS = $CONFIG_COMMANDS
17056 $ $0 $@
17057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058on `(hostname || uname -n) 2>/dev/null | sed 1q`
17059"
17060
Martin v. Löwis11437992002-04-12 09:54:03 +000017061_ACEOF
17062
Matthias Kloseb9621712010-04-24 17:59:49 +000017063case $ac_config_files in *"
17064"*) set x $ac_config_files; shift; ac_config_files=$*;;
17065esac
17066
17067case $ac_config_headers in *"
17068"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17069esac
17070
17071
17072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017073# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017074config_files="$ac_config_files"
17075config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017078
Matthias Kloseb9621712010-04-24 17:59:49 +000017079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017080ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017081\`$as_me' instantiates files and other configuration actions
17082from templates according to the current configuration. Unless the files
17083and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017084
Matthias Kloseb9621712010-04-24 17:59:49 +000017085Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017086
17087 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 --config print configuration, then exit
17090 -q, --quiet, --silent
17091 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 -d, --debug don't remove temporary files
17093 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017094 --file=FILE[:TEMPLATE]
17095 instantiate the configuration file FILE
17096 --header=FILE[:TEMPLATE]
17097 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
17099Configuration files:
17100$config_files
17101
17102Configuration headers:
17103$config_headers
17104
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017105Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17109ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017110ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017111python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017112configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017113 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017114
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017115Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017116This config.status script is free software; the Free Software Foundation
17117gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118
17119ac_pwd='$ac_pwd'
17120srcdir='$srcdir'
17121INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017122MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017123test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017124_ACEOF
17125
Matthias Kloseb9621712010-04-24 17:59:49 +000017126cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17127# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017128ac_need_defaults=:
17129while test $# != 0
17130do
17131 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017132 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17134 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017135 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017137 --*=)
17138 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17139 ac_optarg=
17140 ac_shift=:
17141 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017143 ac_option=$1
17144 ac_optarg=$2
17145 ac_shift=shift
17146 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 esac
17148
Skip Montanaro6dead952003-09-25 14:50:04 +000017149 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017151 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17152 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017154 $as_echo "$ac_cs_version"; exit ;;
17155 --config | --confi | --conf | --con | --co | --c )
17156 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 debug=: ;;
17159 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017160 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017161 case $ac_optarg in
17162 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017163 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017164 esac
17165 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017166 ac_need_defaults=false;;
17167 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017168 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017169 case $ac_optarg in
17170 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17171 esac
17172 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174 --he | --h)
17175 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017176 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017177Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017179 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017180 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17181 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17182 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
17184 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017185 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017186Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
Matthias Kloseb9621712010-04-24 17:59:49 +000017188 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017190
17191 esac
17192 shift
17193done
17194
Skip Montanaro6dead952003-09-25 14:50:04 +000017195ac_configure_extra_args=
17196
17197if $ac_cs_silent; then
17198 exec 6>/dev/null
17199 ac_configure_extra_args="$ac_configure_extra_args --silent"
17200fi
17201
17202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017204if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017205 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 shift
17207 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17208 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017210 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017211fi
17212
Martin v. Löwis11437992002-04-12 09:54:03 +000017213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215exec 5>>config.log
17216{
17217 echo
17218 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17219## Running $as_me. ##
17220_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017221 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017227
Matthias Kloseb9621712010-04-24 17:59:49 +000017228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229
17230# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017231for ac_config_target in $ac_config_targets
17232do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233 case $ac_config_target in
17234 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17235 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17236 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017237 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17238 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17240 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017241 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017242 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017243 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244
Victor Stinnere0be4232011-10-25 13:06:09 +020017245 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017246 esac
17247done
17248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249
Martin v. Löwis11437992002-04-12 09:54:03 +000017250# If the user did not use the arguments to specify the items to instantiate,
17251# then the envvar interface is used. Set only those that are not.
17252# We use the long form for the default assignment because of an extremely
17253# bizarre bug on SunOS 4.1.3.
17254if $ac_need_defaults; then
17255 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17256 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17257fi
17258
Skip Montanaro6dead952003-09-25 14:50:04 +000017259# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017261# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262# Hook for its removal unless debugging.
17263# Note that there is a small window in which the directory will not be cleaned:
17264# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017265$debug ||
17266{
Victor Stinnere0be4232011-10-25 13:06:09 +020017267 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017269 : "${ac_tmp:=$tmp}"
17270 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017273}
Martin v. Löwis11437992002-04-12 09:54:03 +000017274# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017275
Martin v. Löwis11437992002-04-12 09:54:03 +000017276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017278 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017279} ||
17280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 tmp=./conf$$-$RANDOM
17282 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017283} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017284ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017285
Matthias Kloseb9621712010-04-24 17:59:49 +000017286# Set up the scripts for CONFIG_FILES section.
17287# No need to generate them if there are no CONFIG_FILES.
17288# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
Matthias Kloseb9621712010-04-24 17:59:49 +000017291
17292ac_cr=`echo X | tr X '\015'`
17293# On cygwin, bash can eat \r inside `` if the user requested igncr.
17294# But we know of no other shell where ac_cr would be empty at this
17295# point, so we can use a bashism as a fallback.
17296if test "x$ac_cr" = x; then
17297 eval ac_cr=\$\'\\r\'
17298fi
17299ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17300if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017301 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017302else
17303 ac_cs_awk_cr=$ac_cr
17304fi
17305
Victor Stinnere0be4232011-10-25 13:06:09 +020017306echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017307_ACEOF
17308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309
Matthias Kloseb9621712010-04-24 17:59:49 +000017310{
17311 echo "cat >conf$$subs.awk <<_ACEOF" &&
17312 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17313 echo "_ACEOF"
17314} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017315 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17316ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317ac_delim='%!_!# '
17318for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017319 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017320 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17323 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324 break
17325 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017326 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 else
17328 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330done
Matthias Kloseb9621712010-04-24 17:59:49 +000017331rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332
Matthias Kloseb9621712010-04-24 17:59:49 +000017333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017334cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017336sed -n '
17337h
17338s/^/S["/; s/!.*/"]=/
17339p
17340g
17341s/^[^!]*!//
17342:repl
17343t repl
17344s/'"$ac_delim"'$//
17345t delim
17346:nl
17347h
17348s/\(.\{148\}\)..*/\1/
17349t more1
17350s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17351p
17352n
17353b repl
17354:more1
17355s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17356p
17357g
17358s/.\{148\}//
17359t nl
17360:delim
17361h
17362s/\(.\{148\}\)..*/\1/
17363t more2
17364s/["\\]/\\&/g; s/^/"/; s/$/"/
17365p
17366b
17367:more2
17368s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17369p
17370g
17371s/.\{148\}//
17372t delim
17373' <conf$$subs.awk | sed '
17374/^[^""]/{
17375 N
17376 s/\n//
17377}
17378' >>$CONFIG_STATUS || ac_write_fail=1
17379rm -f conf$$subs.awk
17380cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17381_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017382cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017383 for (key in S) S_is_set[key] = 1
17384 FS = ""
17385
17386}
17387{
17388 line = $ 0
17389 nfields = split(line, field, "@")
17390 substed = 0
17391 len = length(field[1])
17392 for (i = 2; i < nfields; i++) {
17393 key = field[i]
17394 keylen = length(key)
17395 if (S_is_set[key]) {
17396 value = S[key]
17397 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17398 len += length(value) + length(field[++i])
17399 substed = 1
17400 } else
17401 len += 1 + keylen
17402 }
17403
17404 print line
17405}
17406
17407_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17410if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17411 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17412else
17413 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017414fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017415 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017416_ACEOF
17417
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017418# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17419# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420# trailing colons and then remove the whole line if VPATH becomes empty
17421# (actually we leave an empty line to preserve line numbers).
17422if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017423 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17424h
17425s///
17426s/^/:/
17427s/[ ]*$/:/
17428s/:\$(srcdir):/:/g
17429s/:\${srcdir}:/:/g
17430s/:@srcdir@:/:/g
17431s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017433x
17434s/\(=[ ]*\).*/\1/
17435G
17436s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437s/^[^=]*=[ ]*$//
17438}'
17439fi
17440
Matthias Kloseb9621712010-04-24 17:59:49 +000017441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017442fi # test -n "$CONFIG_FILES"
17443
Matthias Kloseb9621712010-04-24 17:59:49 +000017444# Set up the scripts for CONFIG_HEADERS section.
17445# No need to generate them if there are no CONFIG_HEADERS.
17446# This happens for instance with `./config.status Makefile'.
17447if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017448cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017449BEGIN {
17450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451
Matthias Kloseb9621712010-04-24 17:59:49 +000017452# Transform confdefs.h into an awk script `defines.awk', embedded as
17453# here-document in config.status, that substitutes the proper values into
17454# config.h.in to produce config.h.
17455
17456# Create a delimiter string that does not exist in confdefs.h, to ease
17457# handling of long lines.
17458ac_delim='%!_!# '
17459for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017460 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17461 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 break
17463 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017464 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017465 else
17466 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17467 fi
17468done
17469
17470# For the awk script, D is an array of macro values keyed by name,
17471# likewise P contains macro parameters if any. Preserve backslash
17472# newline sequences.
17473
17474ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17475sed -n '
17476s/.\{148\}/&'"$ac_delim"'/g
17477t rset
17478:rset
17479s/^[ ]*#[ ]*define[ ][ ]*/ /
17480t def
17481d
17482:def
17483s/\\$//
17484t bsnl
17485s/["\\]/\\&/g
17486s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17487D["\1"]=" \3"/p
17488s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17489d
17490:bsnl
17491s/["\\]/\\&/g
17492s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17493D["\1"]=" \3\\\\\\n"\\/p
17494t cont
17495s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17496t cont
17497d
17498:cont
17499n
17500s/.\{148\}/&'"$ac_delim"'/g
17501t clear
17502:clear
17503s/\\$//
17504t bsnlc
17505s/["\\]/\\&/g; s/^/"/; s/$/"/p
17506d
17507:bsnlc
17508s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17509b cont
17510' <confdefs.h | sed '
17511s/'"$ac_delim"'/"\\\
17512"/g' >>$CONFIG_STATUS || ac_write_fail=1
17513
17514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17515 for (key in D) D_is_set[key] = 1
17516 FS = ""
17517}
17518/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17519 line = \$ 0
17520 split(line, arg, " ")
17521 if (arg[1] == "#") {
17522 defundef = arg[2]
17523 mac1 = arg[3]
17524 } else {
17525 defundef = substr(arg[1], 2)
17526 mac1 = arg[2]
17527 }
17528 split(mac1, mac2, "(") #)
17529 macro = mac2[1]
17530 prefix = substr(line, 1, index(line, defundef) - 1)
17531 if (D_is_set[macro]) {
17532 # Preserve the white space surrounding the "#".
17533 print prefix "define", macro P[macro] D[macro]
17534 next
17535 } else {
17536 # Replace #undef with comments. This is necessary, for example,
17537 # in the case of _POSIX_SOURCE, which is predefined and required
17538 # on some systems where configure will not decide to define it.
17539 if (defundef == "undef") {
17540 print "/*", prefix defundef, macro, "*/"
17541 next
17542 }
17543 }
17544}
17545{ print }
17546_ACAWK
17547_ACEOF
17548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017549 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017550fi # test -n "$CONFIG_HEADERS"
17551
17552
17553eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17554shift
17555for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556do
17557 case $ac_tag in
17558 :[FHLC]) ac_mode=$ac_tag; continue;;
17559 esac
17560 case $ac_mode$ac_tag in
17561 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017562 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563 :[FH]-) ac_tag=-:-;;
17564 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17565 esac
17566 ac_save_IFS=$IFS
17567 IFS=:
17568 set x $ac_tag
17569 IFS=$ac_save_IFS
17570 shift
17571 ac_file=$1
17572 shift
17573
17574 case $ac_mode in
17575 :L) ac_source=$1;;
17576 :[FH])
17577 ac_file_inputs=
17578 for ac_f
17579 do
17580 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017581 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582 *) # Look for the file first in the build tree, then in the source tree
17583 # (if the path is not absolute). The absolute path cannot be DOS-style,
17584 # because $ac_f cannot contain `:'.
17585 test -f "$ac_f" ||
17586 case $ac_f in
17587 [\\/$]*) false;;
17588 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17589 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017590 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17593 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 done
17595
17596 # Let's still pretend it is `configure' which instantiates (i.e., don't
17597 # use $as_me), people would be surprised to read:
17598 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017599 configure_input='Generated from '`
17600 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17601 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 if test x"$ac_file" != x-; then
17603 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17605$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 # Neutralize special characters interpreted by sed in replacement strings.
17608 case $configure_input in #(
17609 *\&* | *\|* | *\\* )
17610 ac_sed_conf_input=`$as_echo "$configure_input" |
17611 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17612 *) ac_sed_conf_input=$configure_input;;
17613 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614
17615 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017616 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17617 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 esac
17619 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 esac
17621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017623$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017624 X"$ac_file" : 'X\(//\)[^/]' \| \
17625 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017627$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17629 s//\1/
17630 q
17631 }
17632 /^X\(\/\/\)[^/].*/{
17633 s//\1/
17634 q
17635 }
17636 /^X\(\/\/\)$/{
17637 s//\1/
17638 q
17639 }
17640 /^X\(\/\).*/{
17641 s//\1/
17642 q
17643 }
17644 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 ac_builddir=.
17647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648case "$ac_dir" in
17649.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17650*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017653 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 case $ac_top_builddir_sub in
17655 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17656 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17657 esac ;;
17658esac
17659ac_abs_top_builddir=$ac_pwd
17660ac_abs_builddir=$ac_pwd$ac_dir_suffix
17661# for backward compatibility:
17662ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017663
17664case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667 ac_top_srcdir=$ac_top_builddir_sub
17668 ac_abs_top_srcdir=$ac_pwd ;;
17669 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 ac_top_srcdir=$srcdir
17672 ac_abs_top_srcdir=$srcdir ;;
17673 *) # Relative name.
17674 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17675 ac_top_srcdir=$ac_top_build_prefix$srcdir
17676 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017677esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017679
Martin v. Löwis11437992002-04-12 09:54:03 +000017680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681 case $ac_mode in
17682 :F)
17683 #
17684 # CONFIG_FILE
17685 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017686
17687 case $INSTALL in
17688 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017691 ac_MKDIR_P=$MKDIR_P
17692 case $MKDIR_P in
17693 [\\/$]* | ?:[\\/]* ) ;;
17694 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17695 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017696_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697
Matthias Kloseb9621712010-04-24 17:59:49 +000017698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699# If the template does not know about datarootdir, expand it.
17700# FIXME: This hack should be removed a few years after 2.60.
17701ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017702ac_sed_dataroot='
17703/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 p
17705 q
17706}
17707/@datadir@/p
17708/@docdir@/p
17709/@infodir@/p
17710/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017711/@mandir@/p'
17712case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713*datarootdir*) ac_datarootdir_seen=yes;;
17714*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17716$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 ac_datarootdir_hack='
17720 s&@datadir@&$datadir&g
17721 s&@docdir@&$docdir&g
17722 s&@infodir@&$infodir&g
17723 s&@localedir@&$localedir&g
17724 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017725 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726esac
17727_ACEOF
17728
17729# Neutralize VPATH when `$srcdir' = `.'.
17730# Shell code in configure.ac might set extrasub.
17731# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17733ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017734$extrasub
17735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017737:t
17738/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017739s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017741s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742s&@srcdir@&$ac_srcdir&;t t
17743s&@abs_srcdir@&$ac_abs_srcdir&;t t
17744s&@top_srcdir@&$ac_top_srcdir&;t t
17745s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17746s&@builddir@&$ac_builddir&;t t
17747s&@abs_builddir@&$ac_abs_builddir&;t t
17748s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17749s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017750s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017752"
Victor Stinnere0be4232011-10-25 13:06:09 +020017753eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17754 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017757 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17758 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17759 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017761which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017762$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017763which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017764
Victor Stinnere0be4232011-10-25 13:06:09 +020017765 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017767 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17768 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017769 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017770 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 ;;
17772 :H)
17773 #
17774 # CONFIG_HEADER
17775 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017777 {
17778 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017779 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17780 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017781 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017782 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017783 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17784$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017786 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017787 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017788 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017789 fi
17790 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017791 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017792 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017793 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017794 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797
17798 esac
17799
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017800
17801 case $ac_file$ac_mode in
17802 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17803
17804 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805done # for ac_tag
17806
Guido van Rossum627b2d71993-12-24 10:39:16 +000017807
Matthias Kloseb9621712010-04-24 17:59:49 +000017808as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017809_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017810ac_clean_files=$ac_clean_files_save
17811
Matthias Kloseb9621712010-04-24 17:59:49 +000017812test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017813 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017814
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
17816# configure is writing to config.log, and then calls config.status.
17817# config.status does its own redirection, appending to config.log.
17818# Unfortunately, on DOS this fails, as config.log is still kept open
17819# by configure, so config.status won't be able to write to it; its
17820# output is simply discarded. So we exec the FD to /dev/null,
17821# effectively closing config.log, so it can be properly (re)opened and
17822# appended to by config.status. When coming back to configure, we
17823# need to make the FD available again.
17824if test "$no_create" != yes; then
17825 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017826 ac_config_status_args=
17827 test "$silent" = yes &&
17828 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017830 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017831 exec 5>>config.log
17832 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17833 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017834 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017835fi
17836if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17838$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017839fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017840
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017841
Christian Heimes75ed8902013-11-20 01:11:18 +010017842echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017843if test ! -f Modules/Setup
17844then
17845 cp $srcdir/Modules/Setup.dist Modules/Setup
17846fi
17847
Christian Heimes75ed8902013-11-20 01:11:18 +010017848echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017849if test ! -f Modules/Setup.local
17850then
17851 echo "# Edit this file for local setup changes" >Modules/Setup.local
17852fi
17853
Christian Heimes75ed8902013-11-20 01:11:18 +010017854echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017855$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17856 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017857 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017858mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017859
17860if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17861 echo "" >&6
17862 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017863 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017864 echo "please run ./configure --with-optimizations" >&6
17865 echo "" >&6
17866 echo "" >&6
17867fi
17868