blob: 025d41f73e0e5620b39643d4c074566f688f9330 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
778localstatedir
779sharedstatedir
780sysconfdir
781datadir
782datarootdir
783libexecdir
784sbindir
785bindir
786program_transform_name
787prefix
788exec_prefix
789PACKAGE_URL
790PACKAGE_BUGREPORT
791PACKAGE_STRING
792PACKAGE_VERSION
793PACKAGE_TARNAME
794PACKAGE_NAME
795PATH_SEPARATOR
796SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000797ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000798ac_user_opts='
799enable_option_checking
800enable_universalsdk
801with_universal_archs
802with_framework_name
803enable_framework
804with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600805with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_cxx_main
807with_suffix
808enable_shared
809enable_profiling
810with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700811with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100812with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100813with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_libs
815with_system_expat
816with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100817with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000818enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700819with_tcltk_includes
820with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_dbmliborder
822with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_threads
824with_thread
825enable_ipv6
826with_doc_strings
827with_tsc
828with_pymalloc
829with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_fpectl
831with_libm
832with_libc
833enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800835with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000836'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 ac_precious_vars='build_alias
838host_alias
839target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100840MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841CC
842CFLAGS
843LDFLAGS
844LIBS
845CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100846CPP
847PKG_CONFIG
848PKG_CONFIG_PATH
849PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000853ac_init_help=
854ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000855ac_unrecognized_opts=
856ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# The variables have the same names as the options, with
858# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862no_recursion=
863prefix=NONE
864program_prefix=NONE
865program_suffix=NONE
866program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871x_includes=NONE
872x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000873
874# Installation directory options.
875# These are left unexpanded so users can "make install exec_prefix=/foo"
876# and all the variables that are supposed to be based on exec_prefix
877# by default will actually change.
878# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880bindir='${exec_prefix}/bin'
881sbindir='${exec_prefix}/sbin'
882libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883datarootdir='${prefix}/share'
884datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885sysconfdir='${prefix}/etc'
886sharedstatedir='${prefix}/com'
887localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888includedir='${prefix}/include'
889oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
891infodir='${datarootdir}/info'
892htmldir='${docdir}'
893dvidir='${docdir}'
894pdfdir='${docdir}'
895psdir='${docdir}'
896libdir='${exec_prefix}/lib'
897localedir='${datarootdir}/locale'
898mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 # If the previous option needs an argument, assign it.
905 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 ac_prev=
908 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200912 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
913 *=) ac_optarg= ;;
914 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 # Accept the important Cygnus configure options, so we can diagnose typos.
918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_dashdash$ac_option in
920 --)
921 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 -bindir | --bindir | --bindi | --bind | --bin | --bi)
924 ac_prev=bindir ;;
925 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933 -cache-file | --cache-file | --cache-fil | --cache-fi \
934 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935 ac_prev=cache_file ;;
936 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 cache_file=$ac_optarg ;;
939
940 --config-cache | -C)
941 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949 | --dataroo | --dataro | --datar)
950 ac_prev=datarootdir ;;
951 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953 datarootdir=$ac_optarg ;;
954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000956 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200959 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt_orig=$ac_useropt
961 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962 case $ac_user_opts in
963 *"
964"enable_$ac_useropt"
965"*) ;;
966 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967 ac_unrecognized_sep=', ';;
968 esac
969 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970
971 -docdir | --docdir | --docdi | --doc | --do)
972 ac_prev=docdir ;;
973 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974 docdir=$ac_optarg ;;
975
976 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977 ac_prev=dvidir ;;
978 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200985 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
994 esac
995 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999 | --exec | --exe | --ex)
1000 ac_prev=exec_prefix ;;
1001 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 # Obsolete; use --with-gas.
1008 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 -help | --help | --hel | --he | -h)
1011 ac_init_help=long ;;
1012 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013 ac_init_help=recursive ;;
1014 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023 ac_prev=htmldir ;;
1024 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025 | --ht=*)
1026 htmldir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -includedir | --includedir | --includedi | --included | --include \
1029 | --includ | --inclu | --incl | --inc)
1030 ac_prev=includedir ;;
1031 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -infodir | --infodir | --infodi | --infod | --info | --inf)
1036 ac_prev=infodir ;;
1037 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libdir | --libdir | --libdi | --libd)
1041 ac_prev=libdir ;;
1042 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046 | --libexe | --libex | --libe)
1047 ac_prev=libexecdir ;;
1048 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 -localedir | --localedir | --localedi | --localed | --locale)
1053 ac_prev=localedir ;;
1054 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055 localedir=$ac_optarg ;;
1056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 ac_prev=localstatedir ;;
1060 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065 ac_prev=mandir ;;
1066 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Obsolete; use --without-fp.
1071 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 no_create=yes ;;
1076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083 | --oldin | --oldi | --old | --ol | --o)
1084 ac_prev=oldincludedir ;;
1085 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091 ac_prev=prefix ;;
1092 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096 | --program-pre | --program-pr | --program-p)
1097 ac_prev=program_prefix ;;
1098 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103 | --program-suf | --program-su | --program-s)
1104 ac_prev=program_suffix ;;
1105 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-transform-name | --program-transform-name \
1110 | --program-transform-nam | --program-transform-na \
1111 | --program-transform-n | --program-transform- \
1112 | --program-transform | --program-transfor \
1113 | --program-transfo | --program-transf \
1114 | --program-trans | --program-tran \
1115 | --progr-tra | --program-tr | --program-t)
1116 ac_prev=program_transform_name ;;
1117 -program-transform-name=* | --program-transform-name=* \
1118 | --program-transform-nam=* | --program-transform-na=* \
1119 | --program-transform-n=* | --program-transform-=* \
1120 | --program-transform=* | --program-transfor=* \
1121 | --program-transfo=* | --program-transf=* \
1122 | --program-trans=* | --program-tran=* \
1123 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001126 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127 ac_prev=pdfdir ;;
1128 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129 pdfdir=$ac_optarg ;;
1130
1131 -psdir | --psdir | --psdi | --psd | --ps)
1132 ac_prev=psdir ;;
1133 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134 psdir=$ac_optarg ;;
1135
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137 | -silent | --silent | --silen | --sile | --sil)
1138 silent=yes ;;
1139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141 ac_prev=sbindir ;;
1142 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
1146 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148 | --sharedst | --shareds | --shared | --share | --shar \
1149 | --sha | --sh)
1150 ac_prev=sharedstatedir ;;
1151 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 -site | --site | --sit)
1158 ac_prev=site ;;
1159 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163 ac_prev=srcdir ;;
1164 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168 | --syscon | --sysco | --sysc | --sys | --sy)
1169 ac_prev=sysconfdir ;;
1170 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180 verbose=yes ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 -version | --version | --versio | --versi | --vers | -V)
1183 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 --x)
1218 # Obsolete; use --with-x.
1219 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222 | --x-incl | --x-inc | --x-in | --x-i)
1223 ac_prev=x_includes ;;
1224 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230 ac_prev=x_libraries ;;
1231 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 *=*)
1240 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 case $ac_envvar in #(
1243 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 export $ac_envvar ;;
1248
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001254 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
1257 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258done
1259
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263fi
1264
Matthias Kloseb9621712010-04-24 17:59:49 +00001265if test -n "$ac_unrecognized_opts"; then
1266 case $enable_option_checking in
1267 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270 esac
1271fi
1272
1273# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275 datadir sysconfdir sharedstatedir localstatedir includedir \
1276 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimesdffa3942016-09-05 23:54:41 +02001277 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 # Remove trailing slashes.
1281 case $ac_val in
1282 */ )
1283 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284 eval $ac_var=\$ac_val;;
1285 esac
1286 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 [\\/$]* | ?:[\\/]* ) continue;;
1289 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001292done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Martin v. Löwis11437992002-04-12 09:54:03 +00001294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303 if test "x$build_alias" = x; then
1304 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 elif test "x$build_alias" != "x$host_alias"; then
1306 cross_compiling=yes
1307 fi
1308fi
1309
1310ac_tool_prefix=
1311test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313test "$silent" = yes && exec 6>/dev/null
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317ac_ls_di=`ls -di .` &&
1318ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001319 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324# Find the source files, if location was not specified.
1325if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 ac_confdir=`$as_dirname -- "$as_myself" ||
1329$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330 X"$as_myself" : 'X\(//\)[^/]' \| \
1331 X"$as_myself" : 'X\(//\)$' \| \
1332 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)[^/].*/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\/\)$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\).*/{
1347 s//\1/
1348 q
1349 }
1350 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353 srcdir=..
1354 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355else
1356 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358if test ! -r "$srcdir/$ac_unique_file"; then
1359 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001360 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001364 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 pwd)`
1366# When building in place, set srcdir=.
1367if test "$ac_abs_confdir" = "$ac_pwd"; then
1368 srcdir=.
1369fi
1370# Remove unnecessary trailing slashes from srcdir.
1371# Double slashes in file names in object file debugging info
1372# mess up M-x gdb in Emacs.
1373case $srcdir in
1374*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375esac
1376for ac_var in $ac_precious_vars; do
1377 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378 eval ac_env_${ac_var}_value=\$${ac_var}
1379 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382
Martin v. Löwis11437992002-04-12 09:54:03 +00001383#
1384# Report the --help message.
1385#
1386if test "$ac_init_help" = "long"; then
1387 # Omit some internal or obsolete options to make the list less imposing.
1388 # This message is too long to be a string in the A/UX 3.1 sh.
1389 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001390\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395VAR=VALUE. See below for descriptions of some of the useful variables.
1396
1397Defaults for the options are specified in brackets.
1398
1399Configuration:
1400 -h, --help display this help and exit
1401 --help=short display options specific to this package
1402 --help=recursive display the short help of all the included packages
1403 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001404 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 --cache-file=FILE cache test results in FILE [disabled]
1406 -C, --config-cache alias for \`--cache-file=config.cache'
1407 -n, --no-create do not create output files
1408 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410Installation directories:
1411 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001412 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416By default, \`make install' will install all the files in
1417\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1418an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419for instance \`--prefix=\$HOME'.
1420
1421For better control, use the options below.
1422
1423Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 --bindir=DIR user executables [EPREFIX/bin]
1425 --sbindir=DIR system admin executables [EPREFIX/sbin]
1426 --libexecdir=DIR program executables [EPREFIX/libexec]
1427 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1428 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1429 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1430 --libdir=DIR object code libraries [EPREFIX/lib]
1431 --includedir=DIR C header files [PREFIX/include]
1432 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1433 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1434 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1435 --infodir=DIR info documentation [DATAROOTDIR/info]
1436 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1437 --mandir=DIR man documentation [DATAROOTDIR/man]
1438 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1439 --htmldir=DIR html documentation [DOCDIR]
1440 --dvidir=DIR dvi documentation [DOCDIR]
1441 --pdfdir=DIR pdf documentation [DOCDIR]
1442 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443_ACEOF
1444
1445 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001446
1447System types:
1448 --build=BUILD configure for building on BUILD [guessed]
1449 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451fi
1452
1453if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001454 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001455 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 cat <<\_ACEOF
1458
1459Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1462 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001463 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001464 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --enable-framework[=INSTALLDIR]
1466 Build (MacOSX|Darwin) framework
1467 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001468 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001469 --enable-loadable-sqlite-extensions
1470 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --enable-ipv6 Enable ipv6 (with ipv4) support
1472 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001473 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476Optional Packages:
1477 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1478 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001479 --with-universal-archs=ARCH
1480 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001481 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001482 --with-framework-name=FRAMEWORK
1483 specify an alternate name of the framework built
1484 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001486 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001487 --with-cxx-main=<compiler>
1488 compile main() and link python executable with C++
1489 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with-suffix=.exe set executable suffix
1491 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001492 --with-lto Enable Link Time Optimization in PGO builds.
1493 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001494 --with-hash-algorithm=[fnv|siphash24]
1495 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001496 --with-address-sanitizer
1497 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001499 --with-system-expat build pyexpat module using an installed expat
1500 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001502 --with-system-libmpdec build _decimal module using an installed libmpdec
1503 library
Ned Deilyd819b932013-09-06 01:07:05 -07001504 --with-tcltk-includes='-I...'
1505 override search for Tcl and Tk include files
1506 --with-tcltk-libs='-L...'
1507 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001508 --with-dbmliborder=db1:db2:...
1509 order to check db backends for dbm. Valid value is a
1510 colon separated string with the backend names
1511 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-threads[=DIRECTORY]
1514 disable/enable thread support
1515 --with(out)-thread[=DIRECTORY]
1516 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001518 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001520 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-fpectl enable SIGFPE catching
1522 --with-libm=STRING math library
1523 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001524 --with(out)-computed-gotos
1525 Use computed gotos in evaluation loop (enabled by
1526 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001527 --with(out)-ensurepip=[=upgrade]
1528 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001531 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 CC C compiler command
1533 CFLAGS C compiler flags
1534 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1535 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001540 PKG_CONFIG path to pkg-config utility
1541 PKG_CONFIG_PATH
1542 directories to add to pkg-config's search path
1543 PKG_CONFIG_LIBDIR
1544 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
1546Use these variables to override the choices made by `configure' or to help
1547it to find libraries and programs with nonstandard names/locations.
1548
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001549Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
1553
1554if test "$ac_init_help" = "recursive"; then
1555 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 test -d "$ac_dir" ||
1558 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_builddir=.
1561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562case "$ac_dir" in
1563.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001565 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 case $ac_top_builddir_sub in
1569 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571 esac ;;
1572esac
1573ac_abs_top_builddir=$ac_pwd
1574ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575# for backward compatibility:
1576ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 ac_top_srcdir=$ac_top_builddir_sub
1582 ac_abs_top_srcdir=$ac_pwd ;;
1583 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 ac_top_srcdir=$srcdir
1586 ac_abs_top_srcdir=$srcdir ;;
1587 *) # Relative name.
1588 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589 ac_top_srcdir=$ac_top_build_prefix$srcdir
1590 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001591esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 cd "$ac_dir" || { ac_status=$?; continue; }
1595 # Check for guested configure.
1596 if test -f "$ac_srcdir/configure.gnu"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599 elif test -f "$ac_srcdir/configure"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001603 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 fi || ac_status=$?
1605 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 done
1607fi
1608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001610if $ac_init_version; then
1611 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001612python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001613generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001615Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616This configure script is free software; the Free Software Foundation
1617gives unlimited permission to copy, distribute and modify it.
1618_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001621
1622## ------------------------ ##
1623## Autoconf initialization. ##
1624## ------------------------ ##
1625
1626# ac_fn_c_try_compile LINENO
1627# --------------------------
1628# Try to compile conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_compile ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 rm -f conftest.$ac_objext
1633 if { { ac_try="$ac_compile"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_compile") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648 test $ac_status = 0; } && {
1649 test -z "$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 } && test -s conftest.$ac_objext; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_compile
1663
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685 test $ac_status = 0; } > conftest.i && {
1686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
1696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_cpp
1700
Matthias Kloseb9621712010-04-24 17:59:49 +00001701# ac_fn_c_try_link LINENO
1702# -----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded.
1704ac_fn_c_try_link ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 rm -f conftest.$ac_objext conftest$ac_exeext
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>conftest.err
1716 ac_status=$?
1717 if test -s conftest.err; then
1718 grep -v '^ *+' conftest.err >conftest.er1
1719 cat conftest.er1 >&5
1720 mv -f conftest.er1 conftest.err
1721 fi
1722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723 test $ac_status = 0; } && {
1724 test -z "$ac_c_werror_flag" ||
1725 test ! -s conftest.err
1726 } && test -s conftest$ac_exeext && {
1727 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001728 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 }; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=1
1736fi
1737 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1738 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1739 # interfere with the next link command; also delete a directory that is
1740 # left behind by Apple's compiler. We do this before executing the actions.
1741 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 as_fn_set_status $ac_retval
1744
1745} # ac_fn_c_try_link
1746
Matthias Kloseb9621712010-04-24 17:59:49 +00001747# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1748# -------------------------------------------------------
1749# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1750# the include files in INCLUDES and setting the cache variable VAR
1751# accordingly.
1752ac_fn_c_check_header_mongrel ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001755 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1757$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001758if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001759 $as_echo_n "(cached) " >&6
1760fi
1761eval ac_res=\$$3
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764else
1765 # Is the header compilable?
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1767$as_echo_n "checking $2 usability... " >&6; }
1768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769/* end confdefs.h. */
1770$4
1771#include <$2>
1772_ACEOF
1773if ac_fn_c_try_compile "$LINENO"; then :
1774 ac_header_compiler=yes
1775else
1776 ac_header_compiler=no
1777fi
1778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1780$as_echo "$ac_header_compiler" >&6; }
1781
1782# Is the header present?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1784$as_echo_n "checking $2 presence... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787#include <$2>
1788_ACEOF
1789if ac_fn_c_try_cpp "$LINENO"; then :
1790 ac_header_preproc=yes
1791else
1792 ac_header_preproc=no
1793fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1796$as_echo "$ac_header_preproc" >&6; }
1797
1798# So? What about this header?
1799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1800 yes:no: )
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1802$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1805 ;;
1806 no:yes:* )
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1808$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1810$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1812$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1814$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001817( $as_echo "## --------------------------------------- ##
1818## Report this to https://bugs.python.org/ ##
1819## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 ) | sed "s/^/$as_me: WARNING: /" >&2
1821 ;;
1822esac
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 eval "$3=\$ac_header_compiler"
1829fi
1830eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832$as_echo "$ac_res" >&6; }
1833fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001835
1836} # ac_fn_c_check_header_mongrel
1837
1838# ac_fn_c_try_run LINENO
1839# ----------------------
1840# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1841# that executables *can* be run.
1842ac_fn_c_try_run ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 if { { ac_try="$ac_link"
1846case "(($ac_try" in
1847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848 *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852 (eval "$ac_link") 2>&5
1853 ac_status=$?
1854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1855 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1856 { { case "(($ac_try" in
1857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1858 *) ac_try_echo=$ac_try;;
1859esac
1860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1861$as_echo "$ac_try_echo"; } >&5
1862 (eval "$ac_try") 2>&5
1863 ac_status=$?
1864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865 test $ac_status = 0; }; }; then :
1866 ac_retval=0
1867else
1868 $as_echo "$as_me: program exited with status $ac_status" >&5
1869 $as_echo "$as_me: failed program was:" >&5
1870sed 's/^/| /' conftest.$ac_ext >&5
1871
1872 ac_retval=$ac_status
1873fi
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_run
1879
1880# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1881# -------------------------------------------------------
1882# Tests whether HEADER exists and can be compiled using the include files in
1883# INCLUDES, setting the cache variable VAR accordingly.
1884ac_fn_c_check_header_compile ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$4
1895#include <$2>
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 eval "$3=yes"
1899else
1900 eval "$3=no"
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001908
1909} # ac_fn_c_check_header_compile
1910
Matthias Kloseb9621712010-04-24 17:59:49 +00001911# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1912# -------------------------------------------
1913# Tests whether TYPE exists after having included INCLUDES, setting cache
1914# variable VAR accordingly.
1915ac_fn_c_check_type ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof ($2))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
1943if (sizeof (($2)))
1944 return 0;
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950
1951else
1952 eval "$3=yes"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001962
1963} # ac_fn_c_check_type
1964
1965# ac_fn_c_find_uintX_t LINENO BITS VAR
1966# ------------------------------------
1967# Finds an unsigned integer type with width BITS, setting cache variable VAR
1968# accordingly.
1969ac_fn_c_find_uintX_t ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1973$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001974if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975 $as_echo_n "(cached) " >&6
1976else
1977 eval "$3=no"
1978 # Order is important - never check a type that is potentially smaller
1979 # than half of the expected target width.
1980 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1981 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
1985int
1986main ()
1987{
1988static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001989test_array [0] = 0;
1990return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 case $ac_type in #(
1998 uint$2_t) :
1999 eval "$3=yes" ;; #(
2000 *) :
2001 eval "$3=\$ac_type" ;;
2002esac
2003fi
2004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002005 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007else
2008 break
2009fi
2010 done
2011fi
2012eval ac_res=\$$3
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2014$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002015 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017} # ac_fn_c_find_uintX_t
2018
2019# ac_fn_c_find_intX_t LINENO BITS VAR
2020# -----------------------------------
2021# Finds a signed integer type with width BITS, setting cache variable VAR
2022# accordingly.
2023ac_fn_c_find_intX_t ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2027$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002028if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002029 $as_echo_n "(cached) " >&6
2030else
2031 eval "$3=no"
2032 # Order is important - never check a type that is potentially smaller
2033 # than half of the expected target width.
2034 for ac_type in int$2_t 'int' 'long int' \
2035 'long long int' 'short int' 'signed char'; do
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002039 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002040int
2041main ()
2042{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002056int
2057main ()
2058{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002059static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002060 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069
2070else
2071 case $ac_type in #(
2072 int$2_t) :
2073 eval "$3=yes" ;; #(
2074 *) :
2075 eval "$3=\$ac_type" ;;
2076esac
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002081 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002082
2083else
2084 break
2085fi
2086 done
2087fi
2088eval ac_res=\$$3
2089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2090$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093} # ac_fn_c_find_intX_t
2094
2095# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2096# --------------------------------------------
2097# Tries to find the compile-time value of EXPR in a program that includes
2098# INCLUDES, setting VAR accordingly. Returns whether the value could be
2099# computed
2100ac_fn_c_compute_int ()
2101{
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 if test "$cross_compiling" = yes; then
2104 # Depending upon the size, compute the lo and hi bounds.
2105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002112test_array [0] = 0;
2113return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_lo=0 ac_mid=0
2121 while :; do
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002129test_array [0] = 0;
2130return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid; break
2138else
2139 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2140 if test $ac_lo -le $ac_mid; then
2141 ac_lo= ac_hi=
2142 break
2143 fi
2144 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 done
2148else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002156test_array [0] = 0;
2157return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_hi=-1 ac_mid=-1
2165 while :; do
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002173test_array [0] = 0;
2174return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002175
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_lo=$ac_mid; break
2182else
2183 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2184 if test $ac_mid -le $ac_hi; then
2185 ac_lo= ac_hi=
2186 break
2187 fi
2188 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191 done
2192else
2193 ac_lo= ac_hi=
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198# Binary search between lo and hi bounds.
2199while test "x$ac_lo" != "x$ac_hi"; do
2200 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h. */
2203$4
2204int
2205main ()
2206{
2207static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002208test_array [0] = 0;
2209return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_compile "$LINENO"; then :
2216 ac_hi=$ac_mid
2217else
2218 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221done
2222case $ac_lo in #((
2223?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2224'') ac_retval=1 ;;
2225esac
2226 else
2227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h. */
2229$4
2230static long int longval () { return $2; }
2231static unsigned long int ulongval () { return $2; }
2232#include <stdio.h>
2233#include <stdlib.h>
2234int
2235main ()
2236{
2237
2238 FILE *f = fopen ("conftest.val", "w");
2239 if (! f)
2240 return 1;
2241 if (($2) < 0)
2242 {
2243 long int i = longval ();
2244 if (i != ($2))
2245 return 1;
2246 fprintf (f, "%ld", i);
2247 }
2248 else
2249 {
2250 unsigned long int i = ulongval ();
2251 if (i != ($2))
2252 return 1;
2253 fprintf (f, "%lu", i);
2254 }
2255 /* Do not output a trailing newline, as this causes \r\n confusion
2256 on some platforms. */
2257 return ferror (f) || fclose (f) != 0;
2258
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_run "$LINENO"; then :
2264 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2265else
2266 ac_retval=1
2267fi
2268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2269 conftest.$ac_objext conftest.beam conftest.$ac_ext
2270rm -f conftest.val
2271
2272 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002273 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002274 as_fn_set_status $ac_retval
2275
2276} # ac_fn_c_compute_int
2277
2278# ac_fn_c_check_func LINENO FUNC VAR
2279# ----------------------------------
2280# Tests whether FUNC exists, setting the cache variable VAR accordingly
2281ac_fn_c_check_func ()
2282{
2283 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2285$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002286if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002287 $as_echo_n "(cached) " >&6
2288else
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290/* end confdefs.h. */
2291/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2293#define $2 innocuous_$2
2294
2295/* System header to define __stub macros and hopefully few prototypes,
2296 which can conflict with char $2 (); below.
2297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2298 <limits.h> exists even on freestanding compilers. */
2299
2300#ifdef __STDC__
2301# include <limits.h>
2302#else
2303# include <assert.h>
2304#endif
2305
2306#undef $2
2307
2308/* Override any GCC internal prototype to avoid an error.
2309 Use char because int might match the return type of a GCC
2310 builtin and then its argument prototype would still apply. */
2311#ifdef __cplusplus
2312extern "C"
2313#endif
2314char $2 ();
2315/* The GNU C library defines this for functions which it implements
2316 to always fail with ENOSYS. Some functions are actually named
2317 something starting with __ and the normal name is an alias. */
2318#if defined __stub_$2 || defined __stub___$2
2319choke me
2320#endif
2321
2322int
2323main ()
2324{
2325return $2 ();
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_link "$LINENO"; then :
2331 eval "$3=yes"
2332else
2333 eval "$3=no"
2334fi
2335rm -f core conftest.err conftest.$ac_objext \
2336 conftest$ac_exeext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002342
2343} # ac_fn_c_check_func
2344
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002345# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2346# ---------------------------------------------
2347# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2348# accordingly.
2349ac_fn_c_check_decl ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 as_decl_name=`echo $2|sed 's/ *(.*//'`
2353 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2355$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2356if eval \${$3+:} false; then :
2357 $as_echo_n "(cached) " >&6
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$4
2362int
2363main ()
2364{
2365#ifndef $as_decl_name
2366#ifdef __cplusplus
2367 (void) $as_decl_use;
2368#else
2369 (void) $as_decl_name;
2370#endif
2371#endif
2372
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$3=yes"
2379else
2380 eval "$3=no"
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383fi
2384eval ac_res=\$$3
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2386$as_echo "$ac_res" >&6; }
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388
2389} # ac_fn_c_check_decl
2390
Matthias Kloseb9621712010-04-24 17:59:49 +00002391# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2392# ----------------------------------------------------
2393# Tries to find if the field MEMBER exists in type AGGR, after including
2394# INCLUDES, setting cache variable VAR accordingly.
2395ac_fn_c_check_member ()
2396{
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2399$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002400if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 $as_echo_n "(cached) " >&6
2402else
2403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2404/* end confdefs.h. */
2405$5
2406int
2407main ()
2408{
2409static $2 ac_aggr;
2410if (ac_aggr.$3)
2411return 0;
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416if ac_fn_c_try_compile "$LINENO"; then :
2417 eval "$4=yes"
2418else
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* end confdefs.h. */
2421$5
2422int
2423main ()
2424{
2425static $2 ac_aggr;
2426if (sizeof ac_aggr.$3)
2427return 0;
2428 ;
2429 return 0;
2430}
2431_ACEOF
2432if ac_fn_c_try_compile "$LINENO"; then :
2433 eval "$4=yes"
2434else
2435 eval "$4=no"
2436fi
2437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2438fi
2439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2440fi
2441eval ac_res=\$$4
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002444 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002445
2446} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002448This file contains any messages produced by compilers while
2449running configure, to aid debugging if configure makes a mistake.
2450
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002451It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002452generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454 $ $0 $@
2455
2456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002458{
2459cat <<_ASUNAME
2460## --------- ##
2461## Platform. ##
2462## --------- ##
2463
2464hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2465uname -m = `(uname -m) 2>/dev/null || echo unknown`
2466uname -r = `(uname -r) 2>/dev/null || echo unknown`
2467uname -s = `(uname -s) 2>/dev/null || echo unknown`
2468uname -v = `(uname -v) 2>/dev/null || echo unknown`
2469
2470/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2471/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2472
2473/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2474/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2475/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002477/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2478/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2479/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2480
2481_ASUNAME
2482
2483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 $as_echo "PATH: $as_dir"
2489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002491
2492} >&5
2493
2494cat >&5 <<_ACEOF
2495
2496
2497## ----------- ##
2498## Core tests. ##
2499## ----------- ##
2500
2501_ACEOF
2502
2503
2504# Keep a trace of the command line.
2505# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002507# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002508# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002509ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002510ac_configure_args0=
2511ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002512ac_must_keep_next=false
2513for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002514do
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 for ac_arg
2516 do
2517 case $ac_arg in
2518 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2520 | -silent | --silent | --silen | --sile | --sil)
2521 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 esac
2525 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002530 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002532 case $ac_arg in
2533 *=* | --config-cache | -C | -disable-* | --disable-* \
2534 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2535 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2536 | -with-* | --with-* | -without-* | --without-* | --x)
2537 case "$ac_configure_args0 " in
2538 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2539 esac
2540 ;;
2541 -* ) ac_must_keep_next=true ;;
2542 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 ;;
2546 esac
2547 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
Matthias Kloseb9621712010-04-24 17:59:49 +00002549{ ac_configure_args0=; unset ac_configure_args0;}
2550{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552# When interrupted or exit'd, cleanup temporary files, and complete
2553# config.log. We remove comments because anyway the quotes in there
2554# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555# WARNING: Use '\'' to represent an apostrophe within the trap.
2556# 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 +00002557trap 'exit_status=$?
2558 # Save into config.log some information that might help in debugging.
2559 {
2560 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002561
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002563## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
2566 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567(
2568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2569 eval ac_val=\$$ac_var
2570 case $ac_val in #(
2571 *${as_nl}*)
2572 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2574$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac
2576 case $ac_var in #(
2577 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2579 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 esac ;;
2581 esac
2582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 "s/'\''/'\''\\\\'\'''\''/g;
2588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2589 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002590 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002592 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac |
2594 sort
2595)
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002597
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002599## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002601 echo
2602 for ac_var in $ac_subst_vars
2603 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 eval ac_val=\$$ac_var
2605 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002609 done | sort
2610 echo
2611
2612 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002616 echo
2617 for ac_var in $ac_subst_files
2618 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_val=\$$ac_var
2620 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002624 done | sort
2625 echo
2626 fi
2627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002630## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002631## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 echo
2635 fi
2636 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 $as_echo "$as_me: caught signal $ac_signal"
2638 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 rm -f core *.core core.conftest.* &&
2641 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002644for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002646done
2647ac_signal=0
2648
2649# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
Matthias Kloseb9621712010-04-24 17:59:49 +00002652$as_echo "/* confdefs.h */" > confdefs.h
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654# Predefined preprocessor variables.
2655
2656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_NAME "$PACKAGE_NAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_VERSION "$PACKAGE_VERSION"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_STRING "$PACKAGE_STRING"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2674_ACEOF
2675
Matthias Kloseb9621712010-04-24 17:59:49 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_URL "$PACKAGE_URL"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002682# Prefer an explicitly selected file to automatically selected ones.
2683ac_site_file1=NONE
2684ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002686 # We do not want a PATH search for config.site.
2687 case $CONFIG_SITE in #((
2688 -*) ac_site_file1=./$CONFIG_SITE;;
2689 */*) ac_site_file1=$CONFIG_SITE;;
2690 *) ac_site_file1=./$CONFIG_SITE;;
2691 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 ac_site_file1=$prefix/share/config.site
2694 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695else
Matthias Kloseb9621712010-04-24 17:59:49 +00002696 ac_site_file1=$ac_default_prefix/share/config.site
2697 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002699for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700do
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 test "x$ac_site_file" = xNONE && continue
2702 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2704$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002706 . "$ac_site_file" \
2707 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2709as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002710See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711 fi
2712done
2713
2714if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 # Some versions of bash will fail to source /dev/null (special files
2716 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2717 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2719$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 esac
2724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725else
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2727$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 >$cache_file
2729fi
2730
2731# Check that the precious variables saved in the cache have kept the same
2732# value.
2733ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2736 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 case $ac_old_set,$ac_new_set in
2740 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2742$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 +00002743 ac_cache_corrupted=: ;;
2744 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 ac_cache_corrupted=: ;;
2748 ,);;
2749 *)
2750 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002751 # differences in whitespace do not lead to failure.
2752 ac_old_val_w=`echo x $ac_old_val`
2753 ac_new_val_w=`echo x $ac_new_val`
2754 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2756$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2757 ac_cache_corrupted=:
2758 else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2760$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2761 eval $ac_var=\$ac_old_val
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2764$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2766$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 fi;;
2768 esac
2769 # Pass precious variables to config.status.
2770 if test "$ac_new_set" = set; then
2771 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002772 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 *) ac_arg=$ac_var=$ac_new_val ;;
2774 esac
2775 case " $ac_configure_args " in
2776 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002777 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 esac
2779 fi
2780done
2781if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2785$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002786 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002788## -------------------- ##
2789## Main body of script. ##
2790## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791
Guido van Rossum7f43da71994-08-01 12:15:30 +00002792ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2796ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797
Guido van Rossum627b2d71993-12-24 10:39:16 +00002798
Michael W. Hudson54241132001-12-07 15:38:26 +00002799
Trent Nelson4d4ec652012-10-16 08:51:24 -04002800
Trent Nelson5595ab52012-10-17 04:47:31 -04002801if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002802 # If we're building out-of-tree, we need to make sure the following
2803 # resources get picked up before their $srcdir counterparts.
2804 # Objects/ -> typeslots.inc
2805 # Include/ -> Python-ast.h, graminit.h
2806 # Python/ -> importlib.h
2807 # (A side effect of this is that these resources will automatically be
2808 # regenerated when building out-of-tree, regardless of whether or not
2809 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2810 # off.)
2811 BASECPPFLAGS="-IObjects -IInclude -IPython"
2812else
2813 BASECPPFLAGS=""
2814fi
2815
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002816
2817
2818
2819
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002820if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821then
2822# Extract the first word of "hg", so it can be a program name with args.
2823set dummy hg; ac_word=$2
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002826if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 $as_echo_n "(cached) " >&6
2828else
2829 if test -n "$HAS_HG"; then
2830 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2831else
2832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833for as_dir in $PATH
2834do
2835 IFS=$as_save_IFS
2836 test -z "$as_dir" && as_dir=.
2837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 ac_cv_prog_HAS_HG="found"
2840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2841 break 2
2842 fi
2843done
2844 done
2845IFS=$as_save_IFS
2846
2847 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2848fi
2849fi
2850HAS_HG=$ac_cv_prog_HAS_HG
2851if test -n "$HAS_HG"; then
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2853$as_echo "$HAS_HG" >&6; }
2854else
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2856$as_echo "no" >&6; }
2857fi
2858
2859
2860else
2861HAS_HG=no-repository
2862fi
2863if test $HAS_HG = found
2864then
2865 HGVERSION="hg id -i \$(srcdir)"
2866 HGTAG="hg id -t \$(srcdir)"
2867 HGBRANCH="hg id -b \$(srcdir)"
2868else
2869 HGVERSION=""
2870 HGTAG=""
2871 HGBRANCH=""
2872fi
2873
2874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002875ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
2877
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002878ac_aux_dir=
2879for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2880 if test -f "$ac_dir/install-sh"; then
2881 ac_aux_dir=$ac_dir
2882 ac_install_sh="$ac_aux_dir/install-sh -c"
2883 break
2884 elif test -f "$ac_dir/install.sh"; then
2885 ac_aux_dir=$ac_dir
2886 ac_install_sh="$ac_aux_dir/install.sh -c"
2887 break
2888 elif test -f "$ac_dir/shtool"; then
2889 ac_aux_dir=$ac_dir
2890 ac_install_sh="$ac_aux_dir/shtool install -c"
2891 break
2892 fi
2893done
2894if test -z "$ac_aux_dir"; then
2895 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2896fi
2897
2898# These three variables are undocumented and unsupported,
2899# and are intended to be withdrawn in a future Autoconf release.
2900# They can cause serious problems if a builder's source tree is in a directory
2901# whose full name contains unusual characters.
2902ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2903ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2904ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2905
2906
2907# Make sure we can run config.sub.
2908$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2909 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2910
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2912$as_echo_n "checking build system type... " >&6; }
2913if ${ac_cv_build+:} false; then :
2914 $as_echo_n "(cached) " >&6
2915else
2916 ac_build_alias=$build_alias
2917test "x$ac_build_alias" = x &&
2918 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2919test "x$ac_build_alias" = x &&
2920 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2921ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2922 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2923
2924fi
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2926$as_echo "$ac_cv_build" >&6; }
2927case $ac_cv_build in
2928*-*-*) ;;
2929*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2930esac
2931build=$ac_cv_build
2932ac_save_IFS=$IFS; IFS='-'
2933set x $ac_cv_build
2934shift
2935build_cpu=$1
2936build_vendor=$2
2937shift; shift
2938# Remember, the first character of IFS is used to create $*,
2939# except with old shells:
2940build_os=$*
2941IFS=$ac_save_IFS
2942case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2943
2944
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2946$as_echo_n "checking host system type... " >&6; }
2947if ${ac_cv_host+:} false; then :
2948 $as_echo_n "(cached) " >&6
2949else
2950 if test "x$host_alias" = x; then
2951 ac_cv_host=$ac_cv_build
2952else
2953 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2954 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2955fi
2956
2957fi
2958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2959$as_echo "$ac_cv_host" >&6; }
2960case $ac_cv_host in
2961*-*-*) ;;
2962*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2963esac
2964host=$ac_cv_host
2965ac_save_IFS=$IFS; IFS='-'
2966set x $ac_cv_host
2967shift
2968host_cpu=$1
2969host_vendor=$2
2970shift; shift
2971# Remember, the first character of IFS is used to create $*,
2972# except with old shells:
2973host_os=$*
2974IFS=$ac_save_IFS
2975case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2976
2977
2978
doko@python.orga10e4a92013-01-25 18:45:12 +01002979
2980
Ned Deilyfcbc2462014-08-22 13:32:49 -07002981# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2982rm -f pybuilddir.txt
2983
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002984for ac_prog in python$PACKAGE_VERSION python3 python
2985do
2986 # Extract the first word of "$ac_prog", so it can be a program name with args.
2987set dummy $ac_prog; ac_word=$2
2988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2989$as_echo_n "checking for $ac_word... " >&6; }
2990if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2991 $as_echo_n "(cached) " >&6
2992else
2993 if test -n "$PYTHON_FOR_GEN"; then
2994 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2995else
2996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2997for as_dir in $PATH
2998do
2999 IFS=$as_save_IFS
3000 test -z "$as_dir" && as_dir=.
3001 for ac_exec_ext in '' $ac_executable_extensions; do
3002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3003 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3005 break 2
3006 fi
3007done
3008 done
3009IFS=$as_save_IFS
3010
3011fi
3012fi
3013PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3014if test -n "$PYTHON_FOR_GEN"; then
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3016$as_echo "$PYTHON_FOR_GEN" >&6; }
3017else
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3019$as_echo "no" >&6; }
3020fi
3021
3022
3023 test -n "$PYTHON_FOR_GEN" && break
3024done
3025test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3026
3027if test "$PYTHON_FOR_GEN" = not-found; then
3028 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3029 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3030 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3031fi
3032
3033
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003034if test "$cross_compiling" = yes; then
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3036$as_echo_n "checking for python interpreter for cross build... " >&6; }
3037 if test -z "$PYTHON_FOR_BUILD"; then
3038 for interp in python$PACKAGE_VERSION python3 python; do
3039 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003040 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 +02003041 break
3042 fi
3043 interp=
3044 done
3045 if test x$interp = x; then
3046 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3047 fi
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3049$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003050 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003051 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003052 # Used to comment out stuff for rebuilding generated files
3053 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003054elif test "$cross_compiling" = maybe; then
3055 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003056else
3057 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003058 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003059fi
3060
3061
Martin v. Löwis11437992002-04-12 09:54:03 +00003062
Martin Pantereac67be2016-07-28 01:28:27 +00003063
Benjamin Petersond23f8222009-04-05 19:13:16 +00003064if test "$prefix" != "/"; then
3065 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3066fi
3067
3068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069
3070
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003071# We don't use PACKAGE_ variables, and they cause conflicts
3072# with other autoconf-based packages that include Python.h
3073grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3074rm confdefs.h
3075mv confdefs.h.new confdefs.h
3076
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003077
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003078VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003079
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003080# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003081
3082SOVERSION=1.0
3083
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003084# The later defininition of _XOPEN_SOURCE disables certain features
3085# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003088
3089
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003090# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3091# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3092# them.
3093
Matthias Kloseb9621712010-04-24 17:59:49 +00003094$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003095
3096
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003097# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3098# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3099# them.
3100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003102
3103
Martin v. Löwisd6320502004-08-12 13:45:08 +00003104# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3105# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3106
Matthias Kloseb9621712010-04-24 17:59:49 +00003107$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003108
3109
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3111# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3112# them.
3113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115
3116
3117
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003118define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003119
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003120# Arguments passed to configure.
3121
3122CONFIG_ARGS="$ac_configure_args"
3123
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3125$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003127if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 case $enableval in
3130 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003131 # Locate the best usable SDK, see Mac/README.txt for more
3132 # information
3133 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003134 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003135 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003136 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3137 if test ! -d "${enableval}"
3138 then
3139 enableval=/
3140 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003141 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003142 ;;
3143 esac
3144 case $enableval in
3145 no)
3146 UNIVERSALSDK=
3147 enable_universalsdk=
3148 ;;
3149 *)
3150 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003151 if test ! -d "${UNIVERSALSDK}"
3152 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003153 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003154 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155 ;;
3156 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003157
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003158
Thomas Wouters477c8d52006-05-27 19:21:47 +00003159else
3160
3161 UNIVERSALSDK=
3162 enable_universalsdk=
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166if test -n "${UNIVERSALSDK}"
3167then
Matthias Kloseb9621712010-04-24 17:59:49 +00003168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3169$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170else
Matthias Kloseb9621712010-04-24 17:59:49 +00003171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3172$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003173fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003176
Ned Deily87adb6e2013-10-18 21:09:56 -07003177ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003178
Ned Deilycbfb9a52012-06-23 16:02:19 -07003179# For backward compatibility reasons we prefer to select '32-bit' if available,
3180# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003182if test "`uname -s`" = "Darwin"
3183then
3184 if test -n "${UNIVERSALSDK}"
3185 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003186 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003187 then
3188 UNIVERSAL_ARCHS="intel"
3189 fi
3190 fi
3191fi
3192
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003193
Matthias Kloseb9621712010-04-24 17:59:49 +00003194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3195$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196
3197# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003198if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003199 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003200 UNIVERSAL_ARCHS="$withval"
3201
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003202fi
3203
Ned Deily87adb6e2013-10-18 21:09:56 -07003204if test -n "${UNIVERSALSDK}"
3205then
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3207$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3208else
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3210$as_echo "no" >&6; }
3211fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003213
3214# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003215if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003216 withval=$with_framework_name;
3217 PYTHONFRAMEWORK=${withval}
3218 PYTHONFRAMEWORKDIR=${withval}.framework
3219 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3220
3221else
3222
3223 PYTHONFRAMEWORK=Python
3224 PYTHONFRAMEWORKDIR=Python.framework
3225 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3226
3227fi
3228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003230if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003232 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003233 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003234 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003235 esac
3236 case $enableval in
3237 no)
3238 PYTHONFRAMEWORK=
3239 PYTHONFRAMEWORKDIR=no-framework
3240 PYTHONFRAMEWORKPREFIX=
3241 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242 FRAMEWORKINSTALLFIRST=
3243 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003244 FRAMEWORKALTINSTALLFIRST=
3245 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003246 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003247 if test "x${prefix}" = "xNONE"; then
3248 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3249 else
3250 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3251 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003252 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003253 ;;
3254 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003255 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003258 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003259 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3260 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003261 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003262 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003263
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003264 if test "x${prefix}" = "xNONE" ; then
3265 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003267 else
3268 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3269 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003270
3271 case "${enableval}" in
3272 /System*)
3273 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3274 if test "${prefix}" = "NONE" ; then
3275 # See below
3276 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3277 fi
3278 ;;
3279
3280 /Library*)
3281 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3282 ;;
3283
3284 */Library/Frameworks)
3285 MDIR="`dirname "${enableval}"`"
3286 MDIR="`dirname "${MDIR}"`"
3287 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3288
3289 if test "${prefix}" = "NONE"; then
3290 # User hasn't specified the
3291 # --prefix option, but wants to install
3292 # the framework in a non-default location,
3293 # ensure that the compatibility links get
3294 # installed relative to that prefix as well
3295 # instead of in /usr/local.
3296 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3297 fi
3298 ;;
3299
3300 *)
3301 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3302 ;;
3303 esac
3304
Jack Jansen127e56e2001-09-11 14:41:54 +00003305 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003306
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003307 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003308 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003312
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003313 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3314
3315 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3316
Jack Jansene578a632001-08-15 01:27:14 +00003317 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003318
Guido van Rossum563e7081996-09-10 18:20:48 +00003319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
Jack Jansene578a632001-08-15 01:27:14 +00003321 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003322 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003323 PYTHONFRAMEWORKPREFIX=
3324 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003325 FRAMEWORKINSTALLFIRST=
3326 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003327 FRAMEWORKALTINSTALLFIRST=
3328 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003329 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003330 if test "x${prefix}" = "xNONE" ; then
3331 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3332 else
3333 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3334 fi
Jack Jansene578a632001-08-15 01:27:14 +00003335 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003336
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338fi
3339
Thomas Wouters477c8d52006-05-27 19:21:47 +00003340
3341
Michael W. Hudson54241132001-12-07 15:38:26 +00003342
3343
3344
3345
Jack Jansene578a632001-08-15 01:27:14 +00003346
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003347
3348
3349
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003350
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003351
Ned Deilyb8f944f2013-11-21 22:42:25 -08003352
Jack Jansene578a632001-08-15 01:27:14 +00003353##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003354## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003355## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003356##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003357# Set name for machine-dependent library files
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3360$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003361if test -z "$MACHDEP"
3362then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003363 # avoid using uname for cross builds
3364 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003365 # ac_sys_system and ac_sys_release are used for setting
3366 # a lot of different things including 'define_xopen_source'
3367 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003368 case "$host" in
3369 *-*-linux*)
3370 ac_sys_system=Linux
3371 ;;
3372 *-*-cygwin*)
3373 ac_sys_system=Cygwin
3374 ;;
3375 *)
3376 # for now, limit cross builds to known configurations
3377 MACHDEP="unknown"
3378 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3379 esac
3380 ac_sys_release=
3381 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003382 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003383 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003384 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003385 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003386 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003387 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003388 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003389 fi
3390 ac_md_system=`echo $ac_sys_system |
3391 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3392 ac_md_release=`echo $ac_sys_release |
3393 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3394 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003395
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003396 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003397 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003398 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003399 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003400 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003401 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003402 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003403fi
Guido van Rossum91922671997-10-09 20:24:13 +00003404
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003405
3406if test "$cross_compiling" = yes; then
3407 case "$host" in
3408 *-*-linux*)
3409 case "$host_cpu" in
3410 arm*)
3411 _host_cpu=arm
3412 ;;
3413 *)
3414 _host_cpu=$host_cpu
3415 esac
3416 ;;
3417 *-*-cygwin*)
3418 _host_cpu=
3419 ;;
3420 *)
3421 # for now, limit cross builds to known configurations
3422 MACHDEP="unknown"
3423 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3424 esac
3425 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3426fi
3427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3429# disable features if it is defined, without any means to access these
3430# features as extensions. For these systems, we skip the definition of
3431# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3432# some feature, make sure there is no alternative way to access this
3433# feature. Also, when using wildcards, make sure you have verified the
3434# need for not defining _XOPEN_SOURCE on all systems matching the
3435# wildcard, and that the wildcard does not include future systems
3436# (which may remove their limitations).
3437case $ac_sys_system/$ac_sys_release in
3438 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3439 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003441 # In addition, Stefan Krah confirms that issue #1244610 exists through
3442 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003443 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003444 define_xopen_source=no
3445 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3446 # also defined. This can be overridden by defining _BSD_SOURCE
3447 # As this has a different meaning on Linux, only define it on OpenBSD
3448
Matthias Kloseb9621712010-04-24 17:59:49 +00003449$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003450
3451 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003452 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003453 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3454 # also defined. This can be overridden by defining _BSD_SOURCE
3455 # As this has a different meaning on Linux, only define it on OpenBSD
3456
Matthias Kloseb9621712010-04-24 17:59:49 +00003457$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003458
3459 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003460 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3461 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3462 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003463 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 +00003464 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003465 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3466 # request to enable features supported by the standard as a request
3467 # to disable features not supported by the standard. The best way
3468 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3469 # entirely and define __EXTENSIONS__ instead.
3470 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003471 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003472 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3473 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003474 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003475 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003476 define_xopen_source=no;;
3477 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003478 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003479 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003480 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003481 # On FreeBSD 4, the math functions C89 does not cover are never defined
3482 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3483 FreeBSD/4.*)
3484 define_xopen_source=no;;
3485 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3486 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3487 # identifies itself as Darwin/7.*
3488 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3489 # disables platform specific features beyond repair.
3490 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3491 # has no effect, don't bother defining them
3492 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003493 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003494 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003495 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003496 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3497 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3498 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003499 AIX/4)
3500 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003501 AIX/5)
3502 if test `uname -r` -eq 1; then
3503 define_xopen_source=no
3504 fi
3505 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003506 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3507 # defining NI_NUMERICHOST.
3508 QNX/6.3.2)
3509 define_xopen_source=no
3510 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003511
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003512esac
3513
3514if test $define_xopen_source = yes
3515then
Victor Stinner14d098d2011-09-07 22:29:43 +02003516 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003517
Victor Stinner14d098d2011-09-07 22:29:43 +02003518$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003519
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003520
3521 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3522 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3523 # several APIs are not declared. Since this is also needed in some
3524 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003525
Matthias Kloseb9621712010-04-24 17:59:49 +00003526$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003527
3528
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003529
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003530$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003531
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003532fi
3533
Christian Heimes647cd872013-12-07 23:39:33 +01003534# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3535case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003536 hp*|HP*)
3537 define_stdc_a1=yes;;
3538 *)
3539 define_stdc_a1=no;;
3540esac
3541
3542if test $define_stdc_a1 = yes
3543then
Christian Heimes647cd872013-12-07 23:39:33 +01003544
3545$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3546
Christian Heimesb02bcae2013-12-08 15:21:08 +01003547fi
Christian Heimes647cd872013-12-07 23:39:33 +01003548
Guido van Rossum91922671997-10-09 20:24:13 +00003549#
3550# SGI compilers allow the specification of the both the ABI and the
3551# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003552# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003553#
3554# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3555# thus supply support for various ABI/ISA combinations. The MACHDEP
3556# variable is also adjusted.
3557#
3558
3559if test ! -z "$SGI_ABI"
3560then
3561 CC="cc $SGI_ABI"
3562 LDFLAGS="$SGI_ABI $LDFLAGS"
3563 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3566$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003567
Jack Jansen6b08a402004-06-03 12:41:45 +00003568# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3569# it may influence the way we can build extensions, so distutils
3570# needs to check it
3571
Thomas Wouters477c8d52006-05-27 19:21:47 +00003572
Jack Jansen6b08a402004-06-03 12:41:45 +00003573CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003574EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003575
Guido van Rossum627b2d71993-12-24 10:39:16 +00003576# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003577
3578# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3579# for debug/optimization stuff. BASECFLAGS is for flags that are required
3580# just to get things to compile and link. Users are free to override OPT
3581# when running configure or make. The build should not break if they do.
3582# BASECFLAGS should generally not be messed with, however.
3583
3584# XXX shouldn't some/most/all of this code be merged with the stuff later
3585# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3587$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003592 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003593 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003594 without_gcc=yes;;
3595 yes) CC=gcc
3596 without_gcc=no;;
3597 *) CC=$withval
3598 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003599 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003602 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003603 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003604 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003605 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003606 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607fi
3608
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3610$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003611
Zachary Ware5af85642015-12-21 12:09:17 -06003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3613$as_echo_n "checking for --with-icc... " >&6; }
3614
3615# Check whether --with-icc was given.
3616if test "${with_icc+set}" = set; then :
3617 withval=$with_icc;
3618 case $withval in
3619 no) CC=${CC:-cc}
3620 with_icc=no;;
3621 yes) CC=icc
3622 CXX=icpc
3623 with_icc=yes;;
3624 *) CC=$withval
3625 with_icc=$withval;;
3626 esac
3627else
3628
3629 with_icc=no
3630fi
3631
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3633$as_echo "$with_icc" >&6; }
3634
Guido van Rossum8b131c51995-03-09 14:10:13 +00003635# If the user switches compilers, we can't believe the cache
3636if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3637then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003638 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003639(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003640fi
3641
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003642# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3643# when the compiler supports them, but we don't always want -O2, and
3644# we set -g later.
3645if test -z "$CFLAGS"; then
3646 CFLAGS=
3647fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003648
3649if test "$ac_sys_system" = "Darwin"
3650then
3651 # Compiler selection on MacOSX is more complicated than
3652 # AC_PROG_CC can handle, see Mac/README.txt for more
3653 # information
3654 if test -z "${CC}"
3655 then
3656 found_gcc=
3657 found_clang=
3658 as_save_IFS=$IFS; IFS=:
3659 for as_dir in $PATH
3660 do
3661 IFS=$as_save_IFS
3662 if test -x $as_dir/gcc; then
3663 if test -z "${found_gcc}"; then
3664 found_gcc=$as_dir/gcc
3665 fi
3666 fi
3667 if test -x $as_dir/clang; then
3668 if test -z "${found_clang}"; then
3669 found_clang=$as_dir/clang
3670 fi
3671 fi
3672 done
3673 IFS=$as_save_IFS
3674
3675 if test -n "$found_gcc" -a -n "$found_clang"
3676 then
3677 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3678 then
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3680$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3681 CC="$found_clang"
3682 CXX="$found_clang++"
3683 fi
3684
3685
3686 elif test -z "$found_gcc" -a -n "$found_clang"
3687 then
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3689$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3690 CC="$found_clang"
3691 CXX="$found_clang++"
3692
3693 elif test -z "$found_gcc" -a -z "$found_clang"
3694 then
3695 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3696 if test -n "${found_clang}"
3697 then
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3699$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3700 CC="${found_clang}"
3701 CXX="`/usr/bin/xcrun -find clang++`"
3702
3703 # else: use default behaviour
3704 fi
3705 fi
3706 fi
3707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003708ac_ext=c
3709ac_cpp='$CPP $CPPFLAGS'
3710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3712ac_compiler_gnu=$ac_cv_c_compiler_gnu
3713if test -n "$ac_tool_prefix"; then
3714 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3715set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003718if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720else
3721 if test -n "$CC"; then
3722 ac_cv_prog_CC="$CC" # Let the user override the test.
3723else
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $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 +00003733 break 2
3734 fi
3735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
Jack Jansendd19cf82001-12-06 22:36:17 +00003739fi
3740fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003742if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3744$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003745else
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748fi
3749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750
Martin v. Löwis11437992002-04-12 09:54:03 +00003751fi
3752if test -z "$ac_cv_prog_CC"; then
3753 ac_ct_CC=$CC
3754 # Extract the first word of "gcc", so it can be a program name with args.
3755set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
3761 if test -n "$ac_ct_CC"; then
3762 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3763else
3764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
3774 fi
3775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781ac_ct_CC=$ac_cv_prog_ac_ct_CC
3782if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3784$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 if test "x$ac_ct_CC" = x; then
3791 CC=""
3792 else
3793 case $cross_compiling:$ac_tool_warned in
3794yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797ac_tool_warned=yes ;;
3798esac
3799 CC=$ac_ct_CC
3800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
3802 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003803fi
3804
Jack Jansendd19cf82001-12-06 22:36:17 +00003805if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 if test -n "$ac_tool_prefix"; then
3807 # 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 +00003808set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3810$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003811if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003813else
3814 if test -n "$CC"; then
3815 ac_cv_prog_CC="$CC" # Let the user override the test.
3816else
Martin v. Löwis11437992002-04-12 09:54:03 +00003817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3818for as_dir in $PATH
3819do
3820 IFS=$as_save_IFS
3821 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $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 +00003826 break 2
3827 fi
3828done
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
3832fi
3833fi
3834CC=$ac_cv_prog_CC
3835if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3837$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3840$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846if test -z "$CC"; then
3847 # Extract the first word of "cc", so it can be a program name with args.
3848set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3850$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003851if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
3854 if test -n "$CC"; then
3855 ac_cv_prog_CC="$CC" # Let the user override the test.
3856else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003857 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3859for as_dir in $PATH
3860do
3861 IFS=$as_save_IFS
3862 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3866 ac_prog_rejected=yes
3867 continue
3868 fi
3869 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 $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 +00003871 break 2
3872 fi
3873done
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003877if test $ac_prog_rejected = yes; then
3878 # We found a bogon in the path, so make sure we never use it.
3879 set dummy $ac_cv_prog_CC
3880 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003882 # We chose a different compiler from the bogus one.
3883 # However, it has the same basename, so the bogon will be chosen
3884 # first if we set CC to just the basename; use the full file name.
3885 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003886 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003887 fi
3888fi
3889fi
3890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003891CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003892if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3894$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003895else
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3897$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003898fi
3899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900
Martin v. Löwis11437992002-04-12 09:54:03 +00003901fi
3902if test -z "$CC"; then
3903 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 do
3906 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3907set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3909$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003910if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003912else
3913 if test -n "$CC"; then
3914 ac_cv_prog_CC="$CC" # Let the user override the test.
3915else
Martin v. Löwis11437992002-04-12 09:54:03 +00003916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3917for as_dir in $PATH
3918do
3919 IFS=$as_save_IFS
3920 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 $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 +00003925 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003927done
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
3931fi
3932fi
3933CC=$ac_cv_prog_CC
3934if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3936$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937else
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3939$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003940fi
3941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 test -n "$CC" && break
3944 done
3945fi
3946if test -z "$CC"; then
3947 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003949do
3950 # Extract the first word of "$ac_prog", so it can be a program name with args.
3951set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3953$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003954if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003956else
3957 if test -n "$ac_ct_CC"; then
3958 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3959else
3960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3961for as_dir in $PATH
3962do
3963 IFS=$as_save_IFS
3964 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 $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 +00003969 break 2
3970 fi
3971done
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003974
Martin v. Löwis11437992002-04-12 09:54:03 +00003975fi
3976fi
3977ac_ct_CC=$ac_cv_prog_ac_ct_CC
3978if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3980$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003981else
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003984fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 test -n "$ac_ct_CC" && break
3988done
Michael W. Hudson54241132001-12-07 15:38:26 +00003989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 if test "x$ac_ct_CC" = x; then
3991 CC=""
3992 else
3993 case $cross_compiling:$ac_tool_warned in
3994yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997ac_tool_warned=yes ;;
3998esac
3999 CC=$ac_ct_CC
4000 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004001fi
4002
4003fi
4004
4005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004008as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004009See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004010
4011# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004012$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4013set X $ac_compile
4014ac_compiler=$2
4015for ac_option in --version -v -V -qversion; do
4016 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
4023 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 if test -s conftest.err; then
4026 sed '10a\
4027... rest of stderr output deleted ...
4028 10q' conftest.err >conftest.er1
4029 cat conftest.er1 >&5
4030 fi
4031 rm -f conftest.er1 conftest.err
4032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }
4034done
Martin v. Löwis11437992002-04-12 09:54:03 +00004035
Matthias Kloseb9621712010-04-24 17:59:49 +00004036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004037/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004038
Martin v. Löwis11437992002-04-12 09:54:03 +00004039int
4040main ()
4041{
4042
4043 ;
4044 return 0;
4045}
4046_ACEOF
4047ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004048ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004049# Try to create an executable without -o first, disregard a.out.
4050# It will help us diagnose broken compilers, and finding out an intuition
4051# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4053$as_echo_n "checking whether the C compiler works... " >&6; }
4054ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4055
4056# The possible output files:
4057ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059ac_rmfiles=
4060for ac_file in $ac_files
4061do
4062 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004064 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4065 esac
4066done
4067rm -f $ac_rmfiles
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004070case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4081# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4082# in a Makefile. We should not override ac_cv_exeext if it was cached,
4083# so that the user can short-circuit this test for compilers unknown to
4084# Autoconf.
4085for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004086do
4087 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004090 ;;
4091 [ab].out )
4092 # We found the default executable, but exeext='' is most
4093 # certainly right.
4094 break;;
4095 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097 then :; else
4098 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4099 fi
4100 # We set ac_cv_exeext here because the later test for it is not
4101 # safe: cross compilers may not add the suffix if given an `-o'
4102 # argument, so we may need to know it at that point already.
4103 # Even if this section looks crufty: it has the advantage of
4104 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105 break;;
4106 * )
4107 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 esac
4109done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110test "$ac_cv_exeext" = no && ac_cv_exeext=
4111
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004112else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113 ac_file=''
4114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004115if test -z "$ac_file"; then :
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4117$as_echo "no" >&6; }
4118$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119sed 's/^/| /' conftest.$ac_ext >&5
4120
Matthias Kloseb9621712010-04-24 17:59:49 +00004121{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004123as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004124See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004125else
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4127$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4130$as_echo_n "checking for C compiler default output file name... " >&6; }
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4132$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134
Matthias Kloseb9621712010-04-24 17:59:49 +00004135rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4138$as_echo_n "checking for suffix of executables... " >&6; }
4139if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4151# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4152# work properly (i.e., refer to `conftest.exe'), while it won't with
4153# `rm'.
4154for ac_file in conftest.exe conftest conftest.*; do
4155 test -f "$ac_file" || continue
4156 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004158 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4159 break;;
4160 * ) break;;
4161 esac
4162done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004166as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004167See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169rm -f conftest conftest$ac_cv_exeext
4170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4171$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172
4173rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174EXEEXT=$ac_cv_exeext
4175ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177/* end confdefs.h. */
4178#include <stdio.h>
4179int
4180main ()
4181{
4182FILE *f = fopen ("conftest.out", "w");
4183 return ferror (f) || fclose (f) != 0;
4184
4185 ;
4186 return 0;
4187}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189ac_clean_files="$ac_clean_files conftest.out"
4190# Check that the compiler produces executables we can run. If not, either
4191# the compiler is broken, or we cross compile.
4192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4193$as_echo_n "checking whether we are cross compiling... " >&6; }
4194if test "$cross_compiling" != yes; then
4195 { { ac_try="$ac_link"
4196case "(($ac_try" in
4197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4198 *) ac_try_echo=$ac_try;;
4199esac
4200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4201$as_echo "$ac_try_echo"; } >&5
4202 (eval "$ac_link") 2>&5
4203 ac_status=$?
4204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4205 test $ac_status = 0; }
4206 if { ac_try='./conftest$ac_cv_exeext'
4207 { { case "(($ac_try" in
4208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4209 *) ac_try_echo=$ac_try;;
4210esac
4211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4212$as_echo "$ac_try_echo"; } >&5
4213 (eval "$ac_try") 2>&5
4214 ac_status=$?
4215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4216 test $ac_status = 0; }; }; then
4217 cross_compiling=no
4218 else
4219 if test "$cross_compiling" = maybe; then
4220 cross_compiling=yes
4221 else
4222 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004224as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004225If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004226See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 fi
4228 fi
4229fi
4230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4231$as_echo "$cross_compiling" >&6; }
4232
4233rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4234ac_clean_files=$ac_clean_files_save
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4236$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004237if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 $as_echo_n "(cached) " >&6
4239else
4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004241/* end confdefs.h. */
4242
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
4251rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253case "(($ac_try" in
4254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4255 *) ac_try_echo=$ac_try;;
4256esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4258$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4262 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 for ac_file in conftest.o conftest.obj conftest.*; do
4264 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4268 break;;
4269 esac
4270done
4271else
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004273sed 's/^/| /' conftest.$ac_ext >&5
4274
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004277as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004278See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004279fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004280rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4283$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004284OBJEXT=$ac_cv_objext
4285ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4287$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004288if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004290else
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294int
4295main ()
4296{
4297#ifndef __GNUC__
4298 choke me
4299#endif
4300
4301 ;
4302 return 0;
4303}
4304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 ac_compiler_gnu=yes
4307else
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004311ac_cv_c_compiler_gnu=$ac_compiler_gnu
4312
4313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4315$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4316if test $ac_compiler_gnu = yes; then
4317 GCC=yes
4318else
4319 GCC=
4320fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004321ac_test_CFLAGS=${CFLAGS+set}
4322ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4324$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004325if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004327else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 ac_save_c_werror_flag=$ac_c_werror_flag
4329 ac_c_werror_flag=yes
4330 ac_cv_prog_cc_g=no
4331 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004334
Martin v. Löwis11437992002-04-12 09:54:03 +00004335int
4336main ()
4337{
4338
4339 ;
4340 return 0;
4341}
4342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004344 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345else
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 CFLAGS=""
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348/* end confdefs.h. */
4349
4350int
4351main ()
4352{
4353
4354 ;
4355 return 0;
4356}
4357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359
Matthias Kloseb9621712010-04-24 17:59:49 +00004360else
4361 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364/* end confdefs.h. */
4365
4366int
4367main ()
4368{
4369
4370 ;
4371 return 0;
4372}
4373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4382 ac_c_werror_flag=$ac_save_c_werror_flag
4383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4385$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004386if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004387 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004388elif test $ac_cv_prog_cc_g = yes; then
4389 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004390 CFLAGS="-g -O2"
4391 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004392 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393 fi
4394else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004395 if test "$GCC" = yes; then
4396 CFLAGS="-O2"
4397 else
4398 CFLAGS=
4399 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4402$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004403if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004405else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004407ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004409/* end confdefs.h. */
4410#include <stdarg.h>
4411#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004412struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004413/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4414struct buf { int x; };
4415FILE * (*rcsopen) (struct buf *, struct stat *, int);
4416static char *e (p, i)
4417 char **p;
4418 int i;
4419{
4420 return p[i];
4421}
4422static char *f (char * (*g) (char **, int), char **p, ...)
4423{
4424 char *s;
4425 va_list v;
4426 va_start (v,p);
4427 s = g (p, va_arg (v,int));
4428 va_end (v);
4429 return s;
4430}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004431
4432/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4433 function prototypes and stuff, but not '\xHH' hex character constants.
4434 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004436 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4437 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004439int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004441/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4442 inside strings and character constants. */
4443#define FOO(x) 'x'
4444int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4445
Skip Montanaro6dead952003-09-25 14:50:04 +00004446int test (int i, double x);
4447struct s1 {int (*f) (int a);};
4448struct s2 {int (*f) (double a);};
4449int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4450int argc;
4451char **argv;
4452int
4453main ()
4454{
4455return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4456 ;
4457 return 0;
4458}
4459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4461 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004462do
4463 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467rm -f core conftest.err conftest.$ac_objext
4468 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004469done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004470rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004471CC=$ac_save_CC
4472
4473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474# AC_CACHE_VAL
4475case "x$ac_cv_prog_cc_c89" in
4476 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4478$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4481$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4485$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004486esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004487if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004488
Matthias Kloseb9621712010-04-24 17:59:49 +00004489fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004490
Martin v. Löwis11437992002-04-12 09:54:03 +00004491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004496
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004497ac_ext=c
4498ac_cpp='$CPP $CPPFLAGS'
4499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4501ac_compiler_gnu=$ac_cv_c_compiler_gnu
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4503$as_echo_n "checking how to run the C preprocessor... " >&6; }
4504# On Suns, sometimes $CPP names a directory.
4505if test -n "$CPP" && test -d "$CPP"; then
4506 CPP=
4507fi
4508if test -z "$CPP"; then
4509 if ${ac_cv_prog_CPP+:} false; then :
4510 $as_echo_n "(cached) " >&6
4511else
4512 # Double quotes because CPP needs to be expanded
4513 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4514 do
4515 ac_preproc_ok=false
4516for ac_c_preproc_warn_flag in '' yes
4517do
4518 # Use a header file that comes with gcc, so configuring glibc
4519 # with a fresh cross-compiler works.
4520 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4521 # <limits.h> exists even on freestanding compilers.
4522 # On the NeXT, cc -E runs the code through the compiler's parser,
4523 # not just through cpp. "Syntax error" is here to catch this case.
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#ifdef __STDC__
4527# include <limits.h>
4528#else
4529# include <assert.h>
4530#endif
4531 Syntax error
4532_ACEOF
4533if ac_fn_c_try_cpp "$LINENO"; then :
4534
4535else
4536 # Broken: fails on valid input.
4537continue
4538fi
4539rm -f conftest.err conftest.i conftest.$ac_ext
4540
4541 # OK, works on sane cases. Now check whether nonexistent headers
4542 # can be detected and how.
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h. */
4545#include <ac_nonexistent.h>
4546_ACEOF
4547if ac_fn_c_try_cpp "$LINENO"; then :
4548 # Broken: success on invalid input.
4549continue
4550else
4551 # Passes both tests.
4552ac_preproc_ok=:
4553break
4554fi
4555rm -f conftest.err conftest.i conftest.$ac_ext
4556
4557done
4558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4559rm -f conftest.i conftest.err conftest.$ac_ext
4560if $ac_preproc_ok; then :
4561 break
4562fi
4563
4564 done
4565 ac_cv_prog_CPP=$CPP
4566
4567fi
4568 CPP=$ac_cv_prog_CPP
4569else
4570 ac_cv_prog_CPP=$CPP
4571fi
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4573$as_echo "$CPP" >&6; }
4574ac_preproc_ok=false
4575for ac_c_preproc_warn_flag in '' yes
4576do
4577 # Use a header file that comes with gcc, so configuring glibc
4578 # with a fresh cross-compiler works.
4579 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4580 # <limits.h> exists even on freestanding compilers.
4581 # On the NeXT, cc -E runs the code through the compiler's parser,
4582 # not just through cpp. "Syntax error" is here to catch this case.
4583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4584/* end confdefs.h. */
4585#ifdef __STDC__
4586# include <limits.h>
4587#else
4588# include <assert.h>
4589#endif
4590 Syntax error
4591_ACEOF
4592if ac_fn_c_try_cpp "$LINENO"; then :
4593
4594else
4595 # Broken: fails on valid input.
4596continue
4597fi
4598rm -f conftest.err conftest.i conftest.$ac_ext
4599
4600 # OK, works on sane cases. Now check whether nonexistent headers
4601 # can be detected and how.
4602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4603/* end confdefs.h. */
4604#include <ac_nonexistent.h>
4605_ACEOF
4606if ac_fn_c_try_cpp "$LINENO"; then :
4607 # Broken: success on invalid input.
4608continue
4609else
4610 # Passes both tests.
4611ac_preproc_ok=:
4612break
4613fi
4614rm -f conftest.err conftest.i conftest.$ac_ext
4615
4616done
4617# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4618rm -f conftest.i conftest.err conftest.$ac_ext
4619if $ac_preproc_ok; then :
4620
4621else
4622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4624as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4625See \`config.log' for more details" "$LINENO" 5; }
4626fi
4627
4628ac_ext=c
4629ac_cpp='$CPP $CPPFLAGS'
4630ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4631ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4632ac_compiler_gnu=$ac_cv_c_compiler_gnu
4633
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4636if ${ac_cv_path_GREP+:} false; then :
4637 $as_echo_n "(cached) " >&6
4638else
4639 if test -z "$GREP"; then
4640 ac_path_GREP_found=false
4641 # Loop through the user's path and test for each of PROGNAME-LIST
4642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4644do
4645 IFS=$as_save_IFS
4646 test -z "$as_dir" && as_dir=.
4647 for ac_prog in grep ggrep; do
4648 for ac_exec_ext in '' $ac_executable_extensions; do
4649 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4650 as_fn_executable_p "$ac_path_GREP" || continue
4651# Check for GNU ac_path_GREP and select it if it is found.
4652 # Check for GNU $ac_path_GREP
4653case `"$ac_path_GREP" --version 2>&1` in
4654*GNU*)
4655 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4656*)
4657 ac_count=0
4658 $as_echo_n 0123456789 >"conftest.in"
4659 while :
4660 do
4661 cat "conftest.in" "conftest.in" >"conftest.tmp"
4662 mv "conftest.tmp" "conftest.in"
4663 cp "conftest.in" "conftest.nl"
4664 $as_echo 'GREP' >> "conftest.nl"
4665 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4666 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4667 as_fn_arith $ac_count + 1 && ac_count=$as_val
4668 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4669 # Best one so far, save it but keep looking for a better one
4670 ac_cv_path_GREP="$ac_path_GREP"
4671 ac_path_GREP_max=$ac_count
4672 fi
4673 # 10*(2^10) chars as input seems more than enough
4674 test $ac_count -gt 10 && break
4675 done
4676 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4677esac
4678
4679 $ac_path_GREP_found && break 3
4680 done
4681 done
4682 done
4683IFS=$as_save_IFS
4684 if test -z "$ac_cv_path_GREP"; then
4685 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4686 fi
4687else
4688 ac_cv_path_GREP=$GREP
4689fi
4690
4691fi
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4693$as_echo "$ac_cv_path_GREP" >&6; }
4694 GREP="$ac_cv_path_GREP"
4695
4696
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004697
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004698
4699
Matthias Kloseb9621712010-04-24 17:59:49 +00004700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4701$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004703# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004704if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004705 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706
4707 case $withval in
4708 no) with_cxx_main=no
4709 MAINCC='$(CC)';;
4710 yes) with_cxx_main=yes
4711 MAINCC='$(CXX)';;
4712 *) with_cxx_main=yes
4713 MAINCC=$withval
4714 if test -z "$CXX"
4715 then
4716 CXX=$withval
4717 fi;;
4718 esac
4719else
4720
4721 with_cxx_main=no
4722 MAINCC='$(CC)'
4723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004724fi
4725
Matthias Kloseb9621712010-04-24 17:59:49 +00004726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4727$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728
4729preset_cxx="$CXX"
4730if test -z "$CXX"
4731then
4732 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004733 gcc) if test -n "$ac_tool_prefix"; then
4734 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4735set dummy ${ac_tool_prefix}g++; ac_word=$2
4736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737$as_echo_n "checking for $ac_word... " >&6; }
4738if ${ac_cv_path_CXX+:} false; then :
4739 $as_echo_n "(cached) " >&6
4740else
4741 case $CXX in
4742 [\\/]* | ?:[\\/]*)
4743 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4744 ;;
4745 *)
4746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in notfound
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757done
4758 done
4759IFS=$as_save_IFS
4760
4761 ;;
4762esac
4763fi
4764CXX=$ac_cv_path_CXX
4765if test -n "$CXX"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4767$as_echo "$CXX" >&6; }
4768else
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
4771fi
4772
4773
4774fi
4775if test -z "$ac_cv_path_CXX"; then
4776 ac_pt_CXX=$CXX
4777 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004781if ${ac_cv_path_ac_pt_CXX+:} false; then :
4782 $as_echo_n "(cached) " >&6
4783else
4784 case $ac_pt_CXX in
4785 [\\/]* | ?:[\\/]*)
4786 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4787 ;;
4788 *)
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in notfound
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
4794 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4798 break 2
4799 fi
4800done
4801 done
4802IFS=$as_save_IFS
4803
4804 ;;
4805esac
4806fi
4807ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4808if test -n "$ac_pt_CXX"; then
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4810$as_echo "$ac_pt_CXX" >&6; }
4811else
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
4814fi
4815
4816 if test "x$ac_pt_CXX" = x; then
4817 CXX="g++"
4818 else
4819 case $cross_compiling:$ac_tool_warned in
4820yes:)
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4823ac_tool_warned=yes ;;
4824esac
4825 CXX=$ac_pt_CXX
4826 fi
4827else
4828 CXX="$ac_cv_path_CXX"
4829fi
4830 ;;
4831 cc) if test -n "$ac_tool_prefix"; then
4832 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4833set dummy ${ac_tool_prefix}c++; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004836if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838else
4839 case $CXX in
4840 [\\/]* | ?:[\\/]*)
4841 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4842 ;;
4843 *)
4844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in notfound
4846do
4847 IFS=$as_save_IFS
4848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853 break 2
4854 fi
4855done
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004857IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004859 ;;
4860esac
4861fi
4862CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004863if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4865$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004866else
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004870
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004871
4872fi
4873if test -z "$ac_cv_path_CXX"; then
4874 ac_pt_CXX=$CXX
4875 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004876set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004880 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004883 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004884 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 +00004885 ;;
4886 *)
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in notfound
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004896 break 2
4897 fi
4898done
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004900IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004901
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004902 ;;
4903esac
4904fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004905ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4906if test -n "$ac_pt_CXX"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4908$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004909else
Matthias Kloseb9621712010-04-24 17:59:49 +00004910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004913
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004914 if test "x$ac_pt_CXX" = x; then
4915 CXX="c++"
4916 else
4917 case $cross_compiling:$ac_tool_warned in
4918yes:)
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4921ac_tool_warned=yes ;;
4922esac
4923 CXX=$ac_pt_CXX
4924 fi
4925else
4926 CXX="$ac_cv_path_CXX"
4927fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004928 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004929 clang|*/clang) if test -n "$ac_tool_prefix"; then
4930 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4931set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_CXX+:} false; then :
4935 $as_echo_n "(cached) " >&6
4936else
4937 case $CXX in
4938 [\\/]* | ?:[\\/]*)
4939 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4940 ;;
4941 *)
4942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in notfound
4944do
4945 IFS=$as_save_IFS
4946 test -z "$as_dir" && as_dir=.
4947 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004949 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951 break 2
4952 fi
4953done
4954 done
4955IFS=$as_save_IFS
4956
Ned Deilycbfb9a52012-06-23 16:02:19 -07004957 ;;
4958esac
4959fi
4960CXX=$ac_cv_path_CXX
4961if test -n "$CXX"; then
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4963$as_echo "$CXX" >&6; }
4964else
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004969
4970fi
4971if test -z "$ac_cv_path_CXX"; then
4972 ac_pt_CXX=$CXX
4973 # Extract the first word of "clang++", so it can be a program name with args.
4974set dummy clang++; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_ac_pt_CXX+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979else
4980 case $ac_pt_CXX in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in notfound
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004992 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997 done
4998IFS=$as_save_IFS
4999
5000 ;;
5001esac
5002fi
5003ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5004if test -n "$ac_pt_CXX"; then
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5006$as_echo "$ac_pt_CXX" >&6; }
5007else
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012 if test "x$ac_pt_CXX" = x; then
5013 CXX="clang++"
5014 else
5015 case $cross_compiling:$ac_tool_warned in
5016yes:)
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5019ac_tool_warned=yes ;;
5020esac
5021 CXX=$ac_pt_CXX
5022 fi
5023else
5024 CXX="$ac_cv_path_CXX"
5025fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005026 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005027 icc|*/icc) if test -n "$ac_tool_prefix"; then
5028 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5029set dummy ${ac_tool_prefix}icpc; ac_word=$2
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
5032if ${ac_cv_path_CXX+:} false; then :
5033 $as_echo_n "(cached) " >&6
5034else
5035 case $CXX in
5036 [\\/]* | ?:[\\/]*)
5037 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5038 ;;
5039 *)
5040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in notfound
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
5045 for ac_exec_ext in '' $ac_executable_extensions; do
5046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5047 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049 break 2
5050 fi
5051done
5052 done
5053IFS=$as_save_IFS
5054
5055 ;;
5056esac
5057fi
5058CXX=$ac_cv_path_CXX
5059if test -n "$CXX"; then
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5061$as_echo "$CXX" >&6; }
5062else
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
5065fi
5066
5067
5068fi
5069if test -z "$ac_cv_path_CXX"; then
5070 ac_pt_CXX=$CXX
5071 # Extract the first word of "icpc", so it can be a program name with args.
5072set dummy icpc; ac_word=$2
5073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
5075if ${ac_cv_path_ac_pt_CXX+:} false; then :
5076 $as_echo_n "(cached) " >&6
5077else
5078 case $ac_pt_CXX in
5079 [\\/]* | ?:[\\/]*)
5080 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5081 ;;
5082 *)
5083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in notfound
5085do
5086 IFS=$as_save_IFS
5087 test -z "$as_dir" && as_dir=.
5088 for ac_exec_ext in '' $ac_executable_extensions; do
5089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5090 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092 break 2
5093 fi
5094done
5095 done
5096IFS=$as_save_IFS
5097
5098 ;;
5099esac
5100fi
5101ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5102if test -n "$ac_pt_CXX"; then
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5104$as_echo "$ac_pt_CXX" >&6; }
5105else
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108fi
5109
5110 if test "x$ac_pt_CXX" = x; then
5111 CXX="icpc"
5112 else
5113 case $cross_compiling:$ac_tool_warned in
5114yes:)
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5117ac_tool_warned=yes ;;
5118esac
5119 CXX=$ac_pt_CXX
5120 fi
5121else
5122 CXX="$ac_cv_path_CXX"
5123fi
5124 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125 esac
5126 if test "$CXX" = "notfound"
5127 then
5128 CXX=""
5129 fi
5130fi
5131if test -z "$CXX"
5132then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005133 if test -n "$ac_tool_prefix"; then
5134 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5135 do
5136 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5137set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5139$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005140if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005142else
5143 if test -n "$CXX"; then
5144 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5145else
5146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in $PATH
5148do
5149 IFS=$as_save_IFS
5150 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005151 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005153 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005155 break 2
5156 fi
5157done
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005159IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005160
5161fi
5162fi
5163CXX=$ac_cv_prog_CXX
5164if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5166$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167else
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5169$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005170fi
5171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005172
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005173 test -n "$CXX" && break
5174 done
5175fi
5176if test -z "$CXX"; then
5177 ac_ct_CXX=$CXX
5178 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5179do
5180 # Extract the first word of "$ac_prog", so it can be a program name with args.
5181set dummy $ac_prog; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
5184if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5185 $as_echo_n "(cached) " >&6
5186else
5187 if test -n "$ac_ct_CXX"; then
5188 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5189else
5190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193 IFS=$as_save_IFS
5194 test -z "$as_dir" && as_dir=.
5195 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005197 ac_cv_prog_ac_ct_CXX="$ac_prog"
5198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199 break 2
5200 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005201done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005202 done
5203IFS=$as_save_IFS
5204
5205fi
5206fi
5207ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5208if test -n "$ac_ct_CXX"; then
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5210$as_echo "$ac_ct_CXX" >&6; }
5211else
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217 test -n "$ac_ct_CXX" && break
5218done
5219
5220 if test "x$ac_ct_CXX" = x; then
5221 CXX="notfound"
5222 else
5223 case $cross_compiling:$ac_tool_warned in
5224yes:)
5225{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5226$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5227ac_tool_warned=yes ;;
5228esac
5229 CXX=$ac_ct_CXX
5230 fi
5231fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005232
5233 if test "$CXX" = "notfound"
5234 then
5235 CXX=""
5236 fi
5237fi
5238if test "$preset_cxx" != "$CXX"
5239then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005240 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005241
5242 By default, distutils will build C++ extension modules with \"$CXX\".
5243 If this is not intended, then set CXX on the configure command line.
5244 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005245$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005246
5247 By default, distutils will build C++ extension modules with \"$CXX\".
5248 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005249 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005250fi
5251
5252
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005253MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5254
5255
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5257$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5258cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005259#undef bfin
5260#undef cris
5261#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005262#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005263#undef hppa
5264#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005266#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005267#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005268#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005269#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005270#if defined(__ANDROID__)
5271# if defined(__x86_64__) && defined(__LP64__)
5272 x86_64-linux-android
5273# elif defined(__i386__)
5274 i686-linux-android
5275# elif defined(__aarch64__) && defined(__AARCH64EL__)
5276# if defined(__ILP32__)
5277 aarch64_ilp32-linux-android
5278# else
5279 aarch64-linux-android
5280# endif
5281# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5282 arm-linux-androideabi
5283# elif defined(__mips_hard_float) && defined(_MIPSEL)
5284# if _MIPS_SIM == _ABIO32
5285 mipsel-linux-android
5286# elif _MIPS_SIM == _ABI64
5287 mips64el-linux-android
5288# else
5289# error unknown platform triplet
5290# endif
5291# else
5292# error unknown platform triplet
5293# endif
5294#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295# if defined(__x86_64__) && defined(__LP64__)
5296 x86_64-linux-gnu
5297# elif defined(__x86_64__) && defined(__ILP32__)
5298 x86_64-linux-gnux32
5299# elif defined(__i386__)
5300 i386-linux-gnu
5301# elif defined(__aarch64__) && defined(__AARCH64EL__)
5302# if defined(__ILP32__)
5303 aarch64_ilp32-linux-gnu
5304# else
5305 aarch64-linux-gnu
5306# endif
5307# elif defined(__aarch64__) && defined(__AARCH64EB__)
5308# if defined(__ILP32__)
5309 aarch64_be_ilp32-linux-gnu
5310# else
5311 aarch64_be-linux-gnu
5312# endif
5313# elif defined(__alpha__)
5314 alpha-linux-gnu
5315# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5316# if defined(__ARMEL__)
5317 arm-linux-gnueabihf
5318# else
5319 armeb-linux-gnueabihf
5320# endif
5321# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5322# if defined(__ARMEL__)
5323 arm-linux-gnueabi
5324# else
5325 armeb-linux-gnueabi
5326# endif
5327# elif defined(__hppa__)
5328 hppa-linux-gnu
5329# elif defined(__ia64__)
5330 ia64-linux-gnu
5331# elif defined(__m68k__) && !defined(__mcoldfire__)
5332 m68k-linux-gnu
5333# elif defined(__mips_hard_float) && defined(_MIPSEL)
5334# if _MIPS_SIM == _ABIO32
5335 mipsel-linux-gnu
5336# elif _MIPS_SIM == _ABIN32
5337 mips64el-linux-gnuabin32
5338# elif _MIPS_SIM == _ABI64
5339 mips64el-linux-gnuabi64
5340# else
5341# error unknown platform triplet
5342# endif
5343# elif defined(__mips_hard_float)
5344# if _MIPS_SIM == _ABIO32
5345 mips-linux-gnu
5346# elif _MIPS_SIM == _ABIN32
5347 mips64-linux-gnuabin32
5348# elif _MIPS_SIM == _ABI64
5349 mips64-linux-gnuabi64
5350# else
5351# error unknown platform triplet
5352# endif
5353# elif defined(__or1k__)
5354 or1k-linux-gnu
5355# elif defined(__powerpc__) && defined(__SPE__)
5356 powerpc-linux-gnuspe
5357# elif defined(__powerpc64__)
5358# if defined(__LITTLE_ENDIAN__)
5359 powerpc64le-linux-gnu
5360# else
5361 powerpc64-linux-gnu
5362# endif
5363# elif defined(__powerpc__)
5364 powerpc-linux-gnu
5365# elif defined(__s390x__)
5366 s390x-linux-gnu
5367# elif defined(__s390__)
5368 s390-linux-gnu
5369# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5370 sh4-linux-gnu
5371# elif defined(__sparc__) && defined(__arch64__)
5372 sparc64-linux-gnu
5373# elif defined(__sparc__)
5374 sparc-linux-gnu
5375# else
5376# error unknown platform triplet
5377# endif
5378#elif defined(__FreeBSD_kernel__)
5379# if defined(__LP64__)
5380 x86_64-kfreebsd-gnu
5381# elif defined(__i386__)
5382 i386-kfreebsd-gnu
5383# else
5384# error unknown platform triplet
5385# endif
5386#elif defined(__gnu_hurd__)
5387 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005388#elif defined(__APPLE__)
5389 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005390#else
5391# error unknown platform triplet
5392#endif
5393
5394EOF
5395
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005396if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005397 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5399$as_echo "$PLATFORM_TRIPLET" >&6; }
5400else
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5402$as_echo "none" >&6; }
5403fi
5404rm -f conftest.c conftest.out
5405
5406if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5407 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5408 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5409 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005410elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5411 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005412fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005413if test x$PLATFORM_TRIPLET = x; then
5414 PLATDIR=plat-$MACHDEP
5415else
5416 PLATDIR=plat-$PLATFORM_TRIPLET
5417fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005418
5419
doko@ubuntu.com55532312016-06-14 08:55:19 +02005420if test x$MULTIARCH != x; then
5421 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5422fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005423
5424
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5426$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5427save_LDFLAGS="$LDFLAGS"
5428LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005429
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5431/* end confdefs.h. */
5432
5433int
5434main ()
5435{
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441if ac_fn_c_try_link "$LINENO"; then :
5442 NO_AS_NEEDED="-Wl,--no-as-needed"
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5444$as_echo "yes" >&6; }
5445else
5446 NO_AS_NEEDED=""
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450rm -f core conftest.err conftest.$ac_objext \
5451 conftest$ac_exeext conftest.$ac_ext
5452LDFLAGS="$save_LDFLAGS"
5453
5454
5455
5456# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5459$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005460if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005462else
5463 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5464 then ac_cv_path_EGREP="$GREP -E"
5465 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 # Loop through the user's path and test for each of PROGNAME-LIST
5469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005470for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5471do
5472 IFS=$as_save_IFS
5473 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 for ac_prog in egrep; do
5475 for ac_exec_ext in '' $ac_executable_extensions; do
5476 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005477 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005478# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005479 # Check for GNU $ac_path_EGREP
5480case `"$ac_path_EGREP" --version 2>&1` in
5481*GNU*)
5482 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5483*)
5484 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005485 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005486 while :
5487 do
5488 cat "conftest.in" "conftest.in" >"conftest.tmp"
5489 mv "conftest.tmp" "conftest.in"
5490 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005492 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5493 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005494 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005495 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5496 # Best one so far, save it but keep looking for a better one
5497 ac_cv_path_EGREP="$ac_path_EGREP"
5498 ac_path_EGREP_max=$ac_count
5499 fi
5500 # 10*(2^10) chars as input seems more than enough
5501 test $ac_count -gt 10 && break
5502 done
5503 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5504esac
5505
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 $ac_path_EGREP_found && break 3
5507 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005508 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005509 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005510IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005511 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005512 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 +00005513 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005514else
5515 ac_cv_path_EGREP=$EGREP
5516fi
5517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005518 fi
5519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5521$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005522 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005523
5524
Matthias Kloseb9621712010-04-24 17:59:49 +00005525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5526$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005527if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005528 $as_echo_n "(cached) " >&6
5529else
5530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005531/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005532#include <stdlib.h>
5533#include <stdarg.h>
5534#include <string.h>
5535#include <float.h>
5536
5537int
5538main ()
5539{
5540
5541 ;
5542 return 0;
5543}
5544_ACEOF
5545if ac_fn_c_try_compile "$LINENO"; then :
5546 ac_cv_header_stdc=yes
5547else
5548 ac_cv_header_stdc=no
5549fi
5550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5551
5552if test $ac_cv_header_stdc = yes; then
5553 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5555/* end confdefs.h. */
5556#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005557
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005558_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005562else
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005564fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005565rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566
Matthias Kloseb9621712010-04-24 17:59:49 +00005567fi
5568
5569if test $ac_cv_header_stdc = yes; then
5570 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572/* end confdefs.h. */
5573#include <stdlib.h>
5574
5575_ACEOF
5576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5577 $EGREP "free" >/dev/null 2>&1; then :
5578
5579else
5580 ac_cv_header_stdc=no
5581fi
5582rm -f conftest*
5583
5584fi
5585
5586if test $ac_cv_header_stdc = yes; then
5587 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5588 if test "$cross_compiling" = yes; then :
5589 :
5590else
5591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5592/* end confdefs.h. */
5593#include <ctype.h>
5594#include <stdlib.h>
5595#if ((' ' & 0x0FF) == 0x020)
5596# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5597# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5598#else
5599# define ISLOWER(c) \
5600 (('a' <= (c) && (c) <= 'i') \
5601 || ('j' <= (c) && (c) <= 'r') \
5602 || ('s' <= (c) && (c) <= 'z'))
5603# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5604#endif
5605
5606#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5607int
5608main ()
5609{
5610 int i;
5611 for (i = 0; i < 256; i++)
5612 if (XOR (islower (i), ISLOWER (i))
5613 || toupper (i) != TOUPPER (i))
5614 return 2;
5615 return 0;
5616}
5617_ACEOF
5618if ac_fn_c_try_run "$LINENO"; then :
5619
5620else
5621 ac_cv_header_stdc=no
5622fi
5623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5624 conftest.$ac_objext conftest.beam conftest.$ac_ext
5625fi
5626
5627fi
5628fi
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5630$as_echo "$ac_cv_header_stdc" >&6; }
5631if test $ac_cv_header_stdc = yes; then
5632
5633$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5634
5635fi
5636
5637# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5638for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5639 inttypes.h stdint.h unistd.h
5640do :
5641 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5642ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5643"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005644if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 cat >>confdefs.h <<_ACEOF
5646#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5647_ACEOF
5648
5649fi
5650
5651done
5652
5653
5654
5655 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 +02005656if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 MINIX=yes
5658else
5659 MINIX=
5660fi
5661
5662
5663 if test "$MINIX" = yes; then
5664
5665$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5666
5667
5668$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5669
5670
5671$as_echo "#define _MINIX 1" >>confdefs.h
5672
5673 fi
5674
5675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5677$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005678if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 $as_echo_n "(cached) " >&6
5680else
5681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5682/* end confdefs.h. */
5683
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005684# define __EXTENSIONS__ 1
5685 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005686int
5687main ()
5688{
5689
5690 ;
5691 return 0;
5692}
5693_ACEOF
5694if ac_fn_c_try_compile "$LINENO"; then :
5695 ac_cv_safe_to_define___extensions__=yes
5696else
5697 ac_cv_safe_to_define___extensions__=no
5698fi
5699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5700fi
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5702$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5703 test $ac_cv_safe_to_define___extensions__ = yes &&
5704 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5705
5706 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5707
5708 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5709
5710 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5711
5712 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5713
5714
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
Xavier de Gaye95750b12016-07-09 11:05:42 +02005716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5717$as_echo_n "checking for the Android API level... " >&6; }
5718cat >> conftest.c <<EOF
5719#ifdef __ANDROID__
5720#include <android/api-level.h>
5721__ANDROID_API__
5722#else
5723#error not Android
5724#endif
5725EOF
5726
5727if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5728 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5730$as_echo "$ANDROID_API_LEVEL" >&6; }
5731
5732cat >>confdefs.h <<_ACEOF
5733#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5734_ACEOF
5735
5736else
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5738$as_echo "not Android" >&6; }
5739fi
5740rm -f conftest.c conftest.out
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742# Check for unsupported systems
5743case $ac_sys_system/$ac_sys_release in
5744atheos*|Linux*/1*)
5745 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5746 echo See README for details.
5747 exit 1;;
5748esac
5749
5750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5752$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753
5754# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005755if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 withval=$with_suffix;
5757 case $withval in
5758 no) EXEEXT=;;
5759 yes) EXEEXT=.exe;;
5760 *) EXEEXT=$withval;;
5761 esac
5762fi
5763
Matthias Kloseb9621712010-04-24 17:59:49 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5765$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766
5767# Test whether we're running on a non-case-sensitive system, in which
5768# case we give a warning if no ext is given
5769
Matthias Kloseb9621712010-04-24 17:59:49 +00005770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5771$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772if test ! -d CaseSensitiveTestDir; then
5773mkdir CaseSensitiveTestDir
5774fi
5775
5776if test -d casesensitivetestdir
5777then
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5779$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 BUILDEXEEXT=.exe
5781else
Matthias Kloseb9621712010-04-24 17:59:49 +00005782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784 BUILDEXEEXT=$EXEEXT
5785fi
5786rmdir CaseSensitiveTestDir
5787
5788case $MACHDEP in
5789bsdos*)
5790 case $CC in
5791 gcc) CC="$CC -D_HAVE_BSDI";;
5792 esac;;
5793esac
5794
5795case $ac_sys_system in
5796hp*|HP*)
5797 case $CC in
5798 cc|*/cc) CC="$CC -Ae";;
5799 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800esac
5801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5804$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805if test -z "$LIBRARY"
5806then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005807 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5810$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811
5812# LDLIBRARY is the name of the library to link against (as opposed to the
5813# name of the library into which to insert object files). BLDLIBRARY is also
5814# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5815# is blank as the main program is not linked directly against LDLIBRARY.
5816# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5817# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5818# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5819# DLLLIBRARY is the shared (i.e., DLL) library.
5820#
5821# RUNSHARED is used to run shared python without installed libraries
5822#
5823# INSTSONAME is the name of the shared library that will be use to install
5824# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005825#
5826# LDVERSION is the shared library version number, normally the Python version
5827# with the ABI build flags appended.
5828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
5830
5831
5832
5833
5834
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836LDLIBRARY="$LIBRARY"
5837BLDLIBRARY='$(LDLIBRARY)'
5838INSTSONAME='$(LDLIBRARY)'
5839DLLLIBRARY=''
5840LDLIBRARYDIR=''
5841RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005842LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843
5844# LINKCC is the command that links the python executable -- default is $(CC).
5845# If CXX is set, and if it is needed to link a main function that was
5846# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5847# python might then depend on the C++ runtime
5848# This is altered for AIX in order to build the export list before
5849# linking.
5850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5852$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853if test -z "$LINKCC"
5854then
5855 LINKCC='$(PURIFY) $(MAINCC)'
5856 case $ac_sys_system in
5857 AIX*)
5858 exp_extra="\"\""
5859 if test $ac_sys_release -ge 5 -o \
5860 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5861 exp_extra="."
5862 fi
5863 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 QNX*)
5865 # qcc must be used because the other compilers do not
5866 # support -N.
5867 LINKCC=qcc;;
5868 esac
5869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5871$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
5873# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5874# make sure we default having it set to "no": this is used by
5875# distutils.unixccompiler to know if it should add --enable-new-dtags
5876# to linker command lines, and failing to detect GNU ld simply results
5877# in the same bahaviour as before.
5878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5880$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881ac_prog=ld
5882if test "$GCC" = yes; then
5883 ac_prog=`$CC -print-prog-name=ld`
5884fi
5885case `"$ac_prog" -V 2>&1 < /dev/null` in
5886 *GNU*)
5887 GNULD=yes;;
5888 *)
5889 GNULD=no;;
5890esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5892$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5895$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005896if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005897 $as_echo_n "(cached) " >&6
5898else
5899 ac_cv_c_inline=no
5900for ac_kw in inline __inline__ __inline; do
5901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902/* end confdefs.h. */
5903#ifndef __cplusplus
5904typedef int foo_t;
5905static $ac_kw foo_t static_foo () {return 0; }
5906$ac_kw foo_t foo () {return 0; }
5907#endif
5908
5909_ACEOF
5910if ac_fn_c_try_compile "$LINENO"; then :
5911 ac_cv_c_inline=$ac_kw
5912fi
5913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5914 test "$ac_cv_c_inline" != no && break
5915done
5916
5917fi
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5919$as_echo "$ac_cv_c_inline" >&6; }
5920
5921case $ac_cv_c_inline in
5922 inline | yes) ;;
5923 *)
5924 case $ac_cv_c_inline in
5925 no) ac_val=;;
5926 *) ac_val=$ac_cv_c_inline;;
5927 esac
5928 cat >>confdefs.h <<_ACEOF
5929#ifndef __cplusplus
5930#define inline $ac_val
5931#endif
5932_ACEOF
5933 ;;
5934esac
5935
5936if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005937
5938$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005939
5940
5941fi
5942
5943
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5945$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005947if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 enableval=$enable_shared;
5949fi
5950
5951
5952if test -z "$enable_shared"
5953then
5954 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005955 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 enable_shared="yes";;
5957 *)
5958 enable_shared="no";;
5959 esac
5960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5962$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963
Matthias Kloseb9621712010-04-24 17:59:49 +00005964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5965$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005967if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005968 enableval=$enable_profiling;
5969fi
5970
5971if test "x$enable_profiling" = xyes; then
5972 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005973 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975/* end confdefs.h. */
5976int main() { return 0; }
5977_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005978if ac_fn_c_try_link "$LINENO"; then :
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005981 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005983rm -f core conftest.err conftest.$ac_objext \
5984 conftest$ac_exeext conftest.$ac_ext
5985 CC="$ac_save_cc"
5986else
5987 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5990$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991
doko@ubuntu.comba015832012-06-30 16:52:05 +02005992if test "x$enable_profiling" = xyes; then
5993 BASECFLAGS="-pg $BASECFLAGS"
5994 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
Matthias Kloseb9621712010-04-24 17:59:49 +00005997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5998$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999
6000# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
6001# library that we build, but we do not want to link against it (we
6002# will find it with a -framework option). For this reason there is an
6003# extra variable BLDLIBRARY against which Python and the extension
6004# modules are linked, BLDLIBRARY. This is normally the same as
6005# LDLIBRARY, but empty for MacOSX framework builds.
6006if test "$enable_framework"
6007then
6008 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006009 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 BLDLIBRARY=''
6011else
6012 BLDLIBRARY='$(LDLIBRARY)'
6013fi
6014
6015# Other platforms follow
6016if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006017 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
Matthias Kloseb9621712010-04-24 17:59:49 +00006019$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020
6021 case $ac_sys_system in
6022 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006023 LDLIBRARY='libpython$(LDVERSION).dll.a'
6024 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025 ;;
6026 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006027 LDLIBRARY='libpython$(LDVERSION).so'
6028 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006029 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006031 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006032 then
6033 PY3LIBRARY=libpython3.so
6034 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02006036 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006037 LDLIBRARY='libpython$(LDVERSION).so'
6038 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006039 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006041 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006042 then
6043 PY3LIBRARY=libpython3.so
6044 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 ;;
6046 hp*|HP*)
6047 case `uname -m` in
6048 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006049 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ;;
6051 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006052 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053 ;;
6054 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006055 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006056 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006059 LDLIBRARY='libpython$(LDVERSION).dylib'
6060 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006061 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006063 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006064 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006065 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006066 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067
6068 esac
6069else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006070 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071 case $ac_sys_system in
6072 CYGWIN*)
6073 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006074 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075 ;;
6076 esac
6077fi
6078
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006079if test "$cross_compiling" = yes; then
6080 RUNSHARED=
6081fi
6082
Matthias Kloseb9621712010-04-24 17:59:49 +00006083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6084$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085
6086if test -n "$ac_tool_prefix"; then
6087 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6088set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006091if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093else
6094 if test -n "$RANLIB"; then
6095 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6096else
6097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098for as_dir in $PATH
6099do
6100 IFS=$as_save_IFS
6101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106 break 2
6107 fi
6108done
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110IFS=$as_save_IFS
6111
6112fi
6113fi
6114RANLIB=$ac_cv_prog_RANLIB
6115if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6117$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118else
Matthias Kloseb9621712010-04-24 17:59:49 +00006119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121fi
6122
6123
6124fi
6125if test -z "$ac_cv_prog_RANLIB"; then
6126 ac_ct_RANLIB=$RANLIB
6127 # Extract the first word of "ranlib", so it can be a program name with args.
6128set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006131if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133else
6134 if test -n "$ac_ct_RANLIB"; then
6135 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6136else
6137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146 break 2
6147 fi
6148done
Matthias Kloseb9621712010-04-24 17:59:49 +00006149 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150IFS=$as_save_IFS
6151
6152fi
6153fi
6154ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6155if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6157$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158else
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161fi
6162
6163 if test "x$ac_ct_RANLIB" = x; then
6164 RANLIB=":"
6165 else
6166 case $cross_compiling:$ac_tool_warned in
6167yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170ac_tool_warned=yes ;;
6171esac
6172 RANLIB=$ac_ct_RANLIB
6173 fi
6174else
6175 RANLIB="$ac_cv_prog_RANLIB"
6176fi
6177
6178
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006179if test -n "$ac_tool_prefix"; then
6180 for ac_prog in ar aal
6181 do
6182 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006186if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188else
6189 if test -n "$AR"; then
6190 ac_cv_prog_AR="$AR" # Let the user override the test.
6191else
6192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195 IFS=$as_save_IFS
6196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006199 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201 break 2
6202 fi
6203done
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205IFS=$as_save_IFS
6206
6207fi
6208fi
6209AR=$ac_cv_prog_AR
6210if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6212$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213else
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216fi
6217
6218
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006219 test -n "$AR" && break
6220 done
6221fi
6222if test -z "$AR"; then
6223 ac_ct_AR=$AR
6224 for ac_prog in ar aal
6225do
6226 # Extract the first word of "$ac_prog", so it can be a program name with args.
6227set dummy $ac_prog; ac_word=$2
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229$as_echo_n "checking for $ac_word... " >&6; }
6230if ${ac_cv_prog_ac_ct_AR+:} false; then :
6231 $as_echo_n "(cached) " >&6
6232else
6233 if test -n "$ac_ct_AR"; then
6234 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6235else
6236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
6241 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006243 ac_cv_prog_ac_ct_AR="$ac_prog"
6244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245 break 2
6246 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006248 done
6249IFS=$as_save_IFS
6250
6251fi
6252fi
6253ac_ct_AR=$ac_cv_prog_ac_ct_AR
6254if test -n "$ac_ct_AR"; then
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6256$as_echo "$ac_ct_AR" >&6; }
6257else
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263 test -n "$ac_ct_AR" && break
6264done
6265
6266 if test "x$ac_ct_AR" = x; then
6267 AR="ar"
6268 else
6269 case $cross_compiling:$ac_tool_warned in
6270yes:)
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6273ac_tool_warned=yes ;;
6274esac
6275 AR=$ac_ct_AR
6276 fi
6277fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
6279
6280# tweak ARFLAGS only if the user didn't set it on the command line
6281
6282if test -z "$ARFLAGS"
6283then
6284 ARFLAGS="rc"
6285fi
6286
doko@ubuntu.com58844492012-06-30 18:25:32 +02006287if test -n "$ac_tool_prefix"; then
6288 for ac_prog in readelf
6289 do
6290 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6291set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6293$as_echo_n "checking for $ac_word... " >&6; }
6294if ${ac_cv_prog_READELF+:} false; then :
6295 $as_echo_n "(cached) " >&6
6296else
6297 if test -n "$READELF"; then
6298 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6299else
6300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303 IFS=$as_save_IFS
6304 test -z "$as_dir" && as_dir=.
6305 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006306 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006307 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6308 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6309 break 2
6310 fi
6311done
6312 done
6313IFS=$as_save_IFS
6314
6315fi
6316fi
6317READELF=$ac_cv_prog_READELF
6318if test -n "$READELF"; then
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6320$as_echo "$READELF" >&6; }
6321else
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
6324fi
6325
6326
6327 test -n "$READELF" && break
6328 done
6329fi
6330if test -z "$READELF"; then
6331 ac_ct_READELF=$READELF
6332 for ac_prog in readelf
6333do
6334 # Extract the first word of "$ac_prog", so it can be a program name with args.
6335set dummy $ac_prog; ac_word=$2
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337$as_echo_n "checking for $ac_word... " >&6; }
6338if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6339 $as_echo_n "(cached) " >&6
6340else
6341 if test -n "$ac_ct_READELF"; then
6342 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6343else
6344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345for as_dir in $PATH
6346do
6347 IFS=$as_save_IFS
6348 test -z "$as_dir" && as_dir=.
6349 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006351 ac_cv_prog_ac_ct_READELF="$ac_prog"
6352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353 break 2
6354 fi
6355done
6356 done
6357IFS=$as_save_IFS
6358
6359fi
6360fi
6361ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6362if test -n "$ac_ct_READELF"; then
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6364$as_echo "$ac_ct_READELF" >&6; }
6365else
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367$as_echo "no" >&6; }
6368fi
6369
6370
6371 test -n "$ac_ct_READELF" && break
6372done
6373
6374 if test "x$ac_ct_READELF" = x; then
6375 READELF=":"
6376 else
6377 case $cross_compiling:$ac_tool_warned in
6378yes:)
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6380$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6381ac_tool_warned=yes ;;
6382esac
6383 READELF=$ac_ct_READELF
6384 fi
6385fi
6386
6387if test "$cross_compiling" = yes; then
6388 case "$READELF" in
6389 readelf|:)
6390 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6391 ;;
6392 esac
6393fi
6394
6395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397case $MACHDEP in
6398bsdos*|hp*|HP*)
6399 # install -d does not work on BSDI or HP-UX
6400 if test -z "$INSTALL"
6401 then
6402 INSTALL="${srcdir}/install-sh -c"
6403 fi
6404esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405# Find a good install program. We prefer a C program (faster),
6406# so one script is as good as another. But avoid the broken or
6407# incompatible versions:
6408# SysV /etc/install, /usr/sbin/install
6409# SunOS /usr/etc/install
6410# IRIX /sbin/install
6411# AIX /bin/install
6412# AmigaOS /C/install, which installs bootblocks on floppy discs
6413# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6414# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6415# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6416# OS/2's system install, which has a completely different semantic
6417# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006418# Reject install programs that cannot install multiple files.
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6420$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006422if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006423 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424else
6425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428 IFS=$as_save_IFS
6429 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006430 # Account for people who put trailing slashes in PATH elements.
6431case $as_dir/ in #((
6432 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006434 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435 /usr/ucb/* ) ;;
6436 *)
6437 # OSF1 and SCO ODT 3.0 have their own names for install.
6438 # Don't use installbsd from OSF since it installs stuff as root
6439 # by default.
6440 for ac_prog in ginstall scoinst install; do
6441 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006442 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 if test $ac_prog = install &&
6444 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6445 # AIX install. It has an incompatible calling convention.
6446 :
6447 elif test $ac_prog = install &&
6448 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6449 # program-specific install script used by HP pwplus--don't use.
6450 :
6451 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006452 rm -rf conftest.one conftest.two conftest.dir
6453 echo one > conftest.one
6454 echo two > conftest.two
6455 mkdir conftest.dir
6456 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6457 test -s conftest.one && test -s conftest.two &&
6458 test -s conftest.dir/conftest.one &&
6459 test -s conftest.dir/conftest.two
6460 then
6461 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6462 break 3
6463 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464 fi
6465 fi
6466 done
6467 done
6468 ;;
6469esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006470
6471 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472IFS=$as_save_IFS
6473
Matthias Kloseb9621712010-04-24 17:59:49 +00006474rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475
6476fi
6477 if test "${ac_cv_path_install+set}" = set; then
6478 INSTALL=$ac_cv_path_install
6479 else
6480 # As a last resort, use the slow shell script. Don't cache a
6481 # value for INSTALL within a source directory, because that will
6482 # break other packages using the cache if that directory is
6483 # removed, or if the value is a relative name.
6484 INSTALL=$ac_install_sh
6485 fi
6486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6488$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006489
6490# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6491# It thinks the first close brace ends the variable substitution.
6492test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6493
6494test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6495
6496test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6497
Matthias Klose93a0ef12012-03-15 18:08:34 +01006498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6499$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6500if test -z "$MKDIR_P"; then
6501 if ${ac_cv_path_mkdir+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6506do
6507 IFS=$as_save_IFS
6508 test -z "$as_dir" && as_dir=.
6509 for ac_prog in mkdir gmkdir; do
6510 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006511 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006512 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6513 'mkdir (GNU coreutils) '* | \
6514 'mkdir (coreutils) '* | \
6515 'mkdir (fileutils) '4.1*)
6516 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6517 break 3;;
6518 esac
6519 done
6520 done
6521 done
6522IFS=$as_save_IFS
6523
6524fi
6525
6526 test -d ./--version && rmdir ./--version
6527 if test "${ac_cv_path_mkdir+set}" = set; then
6528 MKDIR_P="$ac_cv_path_mkdir -p"
6529 else
6530 # As a last resort, use the slow shell script. Don't cache a
6531 # value for MKDIR_P within a source directory, because that will
6532 # break other packages using the cache if that directory is
6533 # removed, or if the value is a relative name.
6534 MKDIR_P="$ac_install_sh -d"
6535 fi
6536fi
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6538$as_echo "$MKDIR_P" >&6; }
6539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540
6541# Not every filesystem supports hard links
6542
6543if test -z "$LN" ; then
6544 case $ac_sys_system in
6545 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546 *) LN=ln;;
6547 esac
6548fi
6549
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006550# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006551
6552ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006553
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6556$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557
6558# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006559if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560 withval=$with_pydebug;
6561if test "$withval" != no
6562then
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6567$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006569 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006570else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006572fi
6573else
Matthias Kloseb9621712010-04-24 17:59:49 +00006574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006576fi
6577
6578
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006579# Enable LTO flags
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6582$as_echo_n "checking for --with-lto... " >&6; }
6583
6584# Check whether --with-lto was given.
6585if test "${with_lto+set}" = set; then :
6586 withval=$with_lto;
6587if test "$withval" != no
6588then
6589 Py_LTO='true'
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6591$as_echo "yes" >&6; };
6592else
6593 Py_LTO='false'
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6595$as_echo "no" >&6; };
6596fi
6597else
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602if test "$Py_LTO" = 'true' ; then
6603 case $CC in
6604 *clang*)
6605 # Any changes made here should be reflected in the GCC+Darwin case below
6606 LTOFLAGS="-flto"
6607 ;;
6608 *gcc*)
6609 case $ac_sys_system in
6610 Darwin*)
6611 LTOFLAGS="-flto"
6612 ;;
6613 *)
6614 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6615 ;;
6616 esac
6617 ;;
6618 esac
6619fi
6620
Brett Cannon7188a3e2015-09-18 15:13:44 -07006621# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006622
6623
6624
6625
6626
6627
Brett Cannon7188a3e2015-09-18 15:13:44 -07006628# Extract the first word of "llvm-profdata", so it can be a program name with args.
6629set dummy llvm-profdata; ac_word=$2
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6631$as_echo_n "checking for $ac_word... " >&6; }
6632if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6633 $as_echo_n "(cached) " >&6
6634else
6635 if test -n "$LLVM_PROF_FOUND"; then
6636 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6637else
6638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639for as_dir in $PATH
6640do
6641 IFS=$as_save_IFS
6642 test -z "$as_dir" && as_dir=.
6643 for ac_exec_ext in '' $ac_executable_extensions; do
6644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6645 ac_cv_prog_LLVM_PROF_FOUND="found"
6646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647 break 2
6648 fi
6649done
6650 done
6651IFS=$as_save_IFS
6652
6653 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6654fi
6655fi
6656LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6657if test -n "$LLVM_PROF_FOUND"; then
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6659$as_echo "$LLVM_PROF_FOUND" >&6; }
6660else
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6662$as_echo "no" >&6; }
6663fi
6664
6665
6666LLVM_PROF_ERR=no
6667case $CC in
6668 *clang*)
6669 # Any changes made here should be reflected in the GCC+Darwin case below
6670 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6671 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6672 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6673 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6674 if test $LLVM_PROF_FOUND = not-found
6675 then
6676 LLVM_PROF_ERR=yes
6677 fi
6678 ;;
6679 *gcc*)
6680 case $ac_sys_system in
6681 Darwin*)
6682 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6683 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6684 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6685 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6686 if test $LLVM_PROF_FOUND = not-found
6687 then
6688 LLVM_PROF_ERR=yes
6689 fi
6690 ;;
6691 *)
6692 PGO_PROF_GEN_FLAG="-fprofile-generate"
6693 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6694 LLVM_PROF_MERGER="true"
6695 LLVM_PROF_FILE=""
6696 ;;
6697 esac
6698 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006699 *icc*)
6700 PGO_PROF_GEN_FLAG="-prof-gen"
6701 PGO_PROF_USE_FLAG="-prof-use"
6702 LLVM_PROF_MERGER="true"
6703 LLVM_PROF_FILE=""
6704 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705esac
6706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6708# merged with this chunk of code?
6709
6710# Optimizer/debugger flags
6711# ------------------------
6712# (The following bit of code is complicated enough - please keep things
6713# indented properly. Just pretend you're editing Python code. ;-)
6714
6715# There are two parallel sets of case statements below, one that checks to
6716# see if OPT was set and one that does BASECFLAGS setting based upon
6717# compiler and platform. BASECFLAGS tweaks need to be made even if the
6718# user set OPT.
6719
6720# tweak OPT based on compiler and platform, only if the user didn't set
6721# it on the command line
6722
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006723if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724then
6725 case $GCC in
6726 yes)
6727 if test "$CC" != 'g++' ; then
6728 STRICT_PROTO="-Wstrict-prototypes"
6729 fi
6730 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6731 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6732 WRAP="-fwrapv"
6733 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006734
6735 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006736 case $CC in
6737 *clang*) WRAP="-fwrapv"
6738 ;;
6739 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 case $ac_cv_prog_cc_g in
6742 yes)
6743 if test "$Py_DEBUG" = 'true' ; then
6744 # Optimization messes up debuggers, so turn it off for
6745 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006746 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6747 OPT="-g -Og -Wall $STRICT_PROTO"
6748 else
6749 OPT="-g -O0 -Wall $STRICT_PROTO"
6750 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 else
6752 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6753 fi
6754 ;;
6755 *)
6756 OPT="-O3 -Wall $STRICT_PROTO"
6757 ;;
6758 esac
6759 case $ac_sys_system in
6760 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6761 ;;
6762 esac
6763 ;;
6764
6765 *)
6766 OPT="-O"
6767 ;;
6768 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769fi
6770
6771
6772
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006774# The -arch flags for universal builds on OSX
6775UNIVERSAL_ARCH_FLAGS=
6776
6777
6778# tweak BASECFLAGS based on compiler and platform
6779case $GCC in
6780yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006781 # Python doesn't violate C99 aliasing rules, but older versions of
6782 # GCC produce warnings for legal Python code. Enable
6783 # -fno-strict-aliasing on versions of GCC that support but produce
6784 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6786$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787 ac_save_cc="$CC"
6788 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006789 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006790 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006792else
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006795
Matthias Kloseb159a552010-04-25 21:00:44 +00006796
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006797int
6798main ()
6799{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006800
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006801 ;
6802 return 0;
6803}
Matthias Kloseb159a552010-04-25 21:00:44 +00006804
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006806if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006807
6808 CC="$ac_save_cc -fstrict-aliasing"
6809 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006811/* end confdefs.h. */
6812
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006813 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006814int
6815main ()
6816{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006817double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006818 ;
6819 return 0;
6820}
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006823if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006824
6825 ac_cv_no_strict_aliasing=no
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827else
Matthias Kloseb159a552010-04-25 21:00:44 +00006828
6829 ac_cv_no_strict_aliasing=yes
6830
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006831fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006833
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834else
Matthias Kloseb159a552010-04-25 21:00:44 +00006835
6836 ac_cv_no_strict_aliasing=no
6837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006840fi
6841
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006842 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6845$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006846 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847 then
6848 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6849 fi
6850
Zachary Ware5af85642015-12-21 12:09:17 -06006851 # ICC doesn't recognize the option, but only emits a warning
6852 ## XXX does it emit an unused result warning and can it be disabled?
6853 case "$CC" in
6854 *icc*)
6855 ac_cv_disable_unused_result_warning=no
6856 ;;
6857 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6859$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6860 ac_save_cc="$CC"
6861 CC="$CC -Wunused-result -Werror"
6862 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006863 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006864 $as_echo_n "(cached) " >&6
6865else
6866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6867/* end confdefs.h. */
6868
6869
6870int
6871main ()
6872{
6873
6874 ;
6875 return 0;
6876}
6877
6878_ACEOF
6879if ac_fn_c_try_compile "$LINENO"; then :
6880
6881 ac_cv_disable_unused_result_warning=yes
6882
6883else
6884
6885 ac_cv_disable_unused_result_warning=no
6886
6887fi
6888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6889fi
6890
6891 CFLAGS="$save_CFLAGS"
6892 CC="$ac_save_cc"
6893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6894$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006895 ;;
6896 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006897
6898 if test $ac_cv_disable_unused_result_warning = yes
6899 then
6900 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6901 fi
6902
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6904$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6905 ac_save_cc="$CC"
6906 CC="$CC -Werror=declaration-after-statement"
6907 save_CFLAGS="$CFLAGS"
6908 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6909 $as_echo_n "(cached) " >&6
6910else
6911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6912/* end confdefs.h. */
6913
6914
6915int
6916main ()
6917{
6918
6919 ;
6920 return 0;
6921}
6922
6923_ACEOF
6924if ac_fn_c_try_compile "$LINENO"; then :
6925
6926 ac_cv_declaration_after_statement_warning=yes
6927
6928else
6929
6930 ac_cv_declaration_after_statement_warning=no
6931
6932fi
6933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6934fi
6935
6936 CFLAGS="$save_CFLAGS"
6937 CC="$ac_save_cc"
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6939$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6940
6941 if test $ac_cv_declaration_after_statement_warning = yes
6942 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006943 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006944 fi
6945
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6947$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6948 ac_save_cc="$CC"
6949 CC="$CC -Wsign-compare"
6950 save_CFLAGS="$CFLAGS"
6951 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6952 $as_echo_n "(cached) " >&6
6953else
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h. */
6956
6957
6958int
6959main ()
6960{
6961
6962 ;
6963 return 0;
6964}
6965
6966_ACEOF
6967if ac_fn_c_try_compile "$LINENO"; then :
6968
6969 ac_cv_enable_sign_compare_warning=yes
6970
6971else
6972
6973 ac_cv_enable_sign_compare_warning=no
6974
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977fi
6978
6979 CFLAGS="$save_CFLAGS"
6980 CC="$ac_save_cc"
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6982$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6983
6984 if test $ac_cv_enable_sign_compare_warning = yes
6985 then
6986 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6987 fi
6988
6989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6990$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6991 ac_save_cc="$CC"
6992 CC="$CC -Wunreachable-code"
6993 save_CFLAGS="$CFLAGS"
6994 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6995 $as_echo_n "(cached) " >&6
6996else
6997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6998/* end confdefs.h. */
6999
7000
7001int
7002main ()
7003{
7004
7005 ;
7006 return 0;
7007}
7008
7009_ACEOF
7010if ac_fn_c_try_compile "$LINENO"; then :
7011
7012 ac_cv_enable_unreachable_code_warning=yes
7013
7014else
7015
7016 ac_cv_enable_unreachable_code_warning=no
7017
7018fi
7019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7020fi
7021
7022 CFLAGS="$save_CFLAGS"
7023 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007024
7025 # Don't enable unreachable code warning in debug mode, since it usually
7026 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007027 # Issue #24324: Unfortunately, the unreachable code warning does not work
7028 # correctly on gcc and has been silently removed from the compiler.
7029 # It is supported on clang but on OS X systems gcc may be an alias
7030 # for clang. Try to determine if the compiler is not really gcc and,
7031 # if so, only then enable the warning.
7032 if test $ac_cv_enable_unreachable_code_warning = yes && \
7033 test "$Py_DEBUG" != "true" && \
7034 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007035 then
7036 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007037 else
7038 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007039 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7041$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007042
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7044 # support. Without this, treatment of subnormals doesn't follow
7045 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007046 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007047 alpha*)
7048 BASECFLAGS="$BASECFLAGS -mieee"
7049 ;;
7050 esac
7051
7052 case $ac_sys_system in
7053 SCO_SV*)
7054 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7055 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007056
7057 # is there any other compiler on Darwin besides gcc?
7058 Darwin*)
7059 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7060 # used to be here, but non-Apple gcc doesn't accept them.
7061 if test "${CC}" = gcc
7062 then
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007064$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007065 case "${UNIVERSALSDK}" in
7066 */MacOSX10.4u.sdk)
7067 # Build using 10.4 SDK, force usage of gcc when the
7068 # compiler is gcc, otherwise the user will get very
7069 # confusing error messages when building on OSX 10.6
7070 CC=gcc-4.0
7071 CPP=cpp-4.0
7072 ;;
7073 esac
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007075$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007076 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077
Ned Deily87adb6e2013-10-18 21:09:56 -07007078 if test "${enable_universalsdk}"
7079 then
7080 case "$UNIVERSAL_ARCHS" in
7081 32-bit)
7082 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7083 LIPO_32BIT_FLAGS=""
7084 ARCH_RUN_32BIT=""
7085 ;;
7086 64-bit)
7087 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7088 LIPO_32BIT_FLAGS=""
7089 ARCH_RUN_32BIT="true"
7090 ;;
7091 all)
7092 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7093 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7094 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7095 ;;
7096 intel)
7097 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7098 LIPO_32BIT_FLAGS="-extract i386"
7099 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7100 ;;
7101 intel-32)
7102 UNIVERSAL_ARCH_FLAGS="-arch i386"
7103 LIPO_32BIT_FLAGS=""
7104 ARCH_RUN_32BIT=""
7105 ;;
7106 3-way)
7107 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7108 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7109 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7110 ;;
7111 *)
7112 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7113 ;;
7114 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115
Ned Deily87adb6e2013-10-18 21:09:56 -07007116 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7117 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7118 if test "${UNIVERSALSDK}" != "/"
7119 then
7120 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7121 fi
7122 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007123
Ned Deily87adb6e2013-10-18 21:09:56 -07007124 # Calculate an appropriate deployment target for this build:
7125 # The deployment target value is used explicitly to enable certain
7126 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007127 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007128 # component of the string returned by distutils.get_platform().
7129 #
7130 # Use the value from:
7131 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7132 # 2. the operating system version of the build machine if >= 10.6
7133 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7134 # below to pick either 10.3, 10.4, or 10.5 as the target.
7135 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136
Ned Deily87adb6e2013-10-18 21:09:56 -07007137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7138$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007139 cur_target_major=`sw_vers -productVersion | \
7140 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7141 cur_target_minor=`sw_vers -productVersion | \
7142 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7143 cur_target="${cur_target_major}.${cur_target_minor}"
7144 if test ${cur_target_major} -eq 10 && \
7145 test ${cur_target_minor} -ge 3 && \
7146 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007147 then
Ned Deily36820b62014-06-25 13:44:22 -07007148 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007149 cur_target=10.3
7150 if test ${enable_universalsdk}
7151 then
7152 case "$UNIVERSAL_ARCHS" in
7153 all|3-way|intel|64-bit)
7154 # These configurations were first supported in 10.5
7155 cur_target='10.5'
7156 ;;
7157 esac
7158 else
7159 if test `/usr/bin/arch` = "i386"
7160 then
7161 # 10.4 was the first release to support Intel archs
7162 cur_target="10.4"
7163 fi
7164 fi
7165 fi
7166 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007167
Ned Deily87adb6e2013-10-18 21:09:56 -07007168 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7169 # environment with a value that is the same as what we'll use
7170 # in the Makefile to ensure that we'll get the same compiler
7171 # environment during configure and build time.
7172 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7173 export MACOSX_DEPLOYMENT_TARGET
7174 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7176$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007177
Ned Deily87adb6e2013-10-18 21:09:56 -07007178 # end of Darwin* tests
7179 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007180 esac
7181 ;;
7182
7183*)
7184 case $ac_sys_system in
7185 OpenUNIX*|UnixWare*)
7186 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7187 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188 SCO_SV*)
7189 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7190 ;;
7191 esac
7192 ;;
7193esac
7194
Zachary Ware5af85642015-12-21 12:09:17 -06007195# ICC needs -fp-model strict or floats behave badly
7196case "$CC" in
7197*icc*)
7198 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7199 ;;
7200esac
7201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007202if test "$Py_DEBUG" = 'true'; then
7203 :
7204else
7205 OPT="-DNDEBUG $OPT"
7206fi
7207
7208if test "$ac_arch_flags"
7209then
7210 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7211fi
7212
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213# On some compilers, pthreads are available without further options
7214# (e.g. MacOS X). On some of these systems, the compiler will not
7215# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7216# So we have to see first whether pthreads are available without
7217# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7219$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007220if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007221 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007222else
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224 ac_cv_pthread_is_default=no
7225else
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007227/* end confdefs.h. */
7228
Stefan Krah7dba5942012-11-22 22:49:11 +01007229#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007230#include <pthread.h>
7231
7232void* routine(void* p){return NULL;}
7233
7234int main(){
7235 pthread_t p;
7236 if(pthread_create(&p,NULL,routine,NULL)!=0)
7237 return 1;
7238 (void)pthread_detach(p);
7239 return 0;
7240}
7241
7242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007243if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007244
7245 ac_cv_pthread_is_default=yes
7246 ac_cv_kthread=no
7247 ac_cv_pthread=no
7248
7249else
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254fi
7255
7256
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257fi
7258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7260$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261
7262
7263if test $ac_cv_pthread_is_default = yes
7264then
7265 ac_cv_kpthread=no
7266else
7267# -Kpthread, if available, provides the right #defines
7268# and linker options to make pthread_create available
7269# Some compilers won't report that they do not support -Kpthread,
7270# so we need to run a program to see whether it really made the
7271# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7273$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007274if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007275 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007276else
7277 ac_save_cc="$CC"
7278CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007279if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007280 ac_cv_kpthread=no
7281else
Matthias Kloseb9621712010-04-24 17:59:49 +00007282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007283/* end confdefs.h. */
7284
Stefan Krah7dba5942012-11-22 22:49:11 +01007285#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286#include <pthread.h>
7287
7288void* routine(void* p){return NULL;}
7289
7290int main(){
7291 pthread_t p;
7292 if(pthread_create(&p,NULL,routine,NULL)!=0)
7293 return 1;
7294 (void)pthread_detach(p);
7295 return 0;
7296}
7297
7298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007299if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007300 ac_cv_kpthread=yes
7301else
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007306fi
7307
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308CC="$ac_save_cc"
7309fi
7310
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7312$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313fi
7314
7315if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7316then
7317# -Kthread, if available, provides the right #defines
7318# and linker options to make pthread_create available
7319# Some compilers won't report that they do not support -Kthread,
7320# so we need to run a program to see whether it really made the
7321# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7323$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007324if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326else
7327 ac_save_cc="$CC"
7328CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007329if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330 ac_cv_kthread=no
7331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333/* end confdefs.h. */
7334
Stefan Krah7dba5942012-11-22 22:49:11 +01007335#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336#include <pthread.h>
7337
7338void* routine(void* p){return NULL;}
7339
7340int main(){
7341 pthread_t p;
7342 if(pthread_create(&p,NULL,routine,NULL)!=0)
7343 return 1;
7344 (void)pthread_detach(p);
7345 return 0;
7346}
7347
7348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007349if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350 ac_cv_kthread=yes
7351else
Matthias Kloseb9621712010-04-24 17:59:49 +00007352 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356fi
7357
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358CC="$ac_save_cc"
7359fi
7360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7362$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363fi
7364
7365if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7366then
7367# -pthread, if available, provides the right #defines
7368# and linker options to make pthread_create available
7369# Some compilers won't report that they do not support -pthread,
7370# so we need to run a program to see whether it really made the
7371# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7373$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007374if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376else
7377 ac_save_cc="$CC"
7378CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007379if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380 ac_cv_pthread=no
7381else
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383/* end confdefs.h. */
7384
Stefan Krah7dba5942012-11-22 22:49:11 +01007385#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386#include <pthread.h>
7387
7388void* routine(void* p){return NULL;}
7389
7390int main(){
7391 pthread_t p;
7392 if(pthread_create(&p,NULL,routine,NULL)!=0)
7393 return 1;
7394 (void)pthread_detach(p);
7395 return 0;
7396}
7397
7398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007399if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400 ac_cv_pthread=yes
7401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7405 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406fi
7407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408CC="$ac_save_cc"
7409fi
7410
Matthias Kloseb9621712010-04-24 17:59:49 +00007411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7412$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413fi
7414
7415# If we have set a CC compiler flag for thread support then
7416# check if it works for CXX, too.
7417ac_cv_cxx_thread=no
7418if test ! -z "$CXX"
7419then
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7421$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422ac_save_cxx="$CXX"
7423
7424if test "$ac_cv_kpthread" = "yes"
7425then
7426 CXX="$CXX -Kpthread"
7427 ac_cv_cxx_thread=yes
7428elif test "$ac_cv_kthread" = "yes"
7429then
7430 CXX="$CXX -Kthread"
7431 ac_cv_cxx_thread=yes
7432elif test "$ac_cv_pthread" = "yes"
7433then
7434 CXX="$CXX -pthread"
7435 ac_cv_cxx_thread=yes
7436fi
7437
7438if test $ac_cv_cxx_thread = yes
7439then
7440 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7441 $CXX -c conftest.$ac_ext 2>&5
7442 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7443 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7444 then
7445 ac_cv_cxx_thread=yes
7446 else
7447 ac_cv_cxx_thread=no
7448 fi
7449 rm -fr conftest*
7450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7452$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453fi
7454CXX="$ac_save_cxx"
7455
7456
7457# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7459$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007460if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462else
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464/* end confdefs.h. */
7465#include <stdlib.h>
7466#include <stdarg.h>
7467#include <string.h>
7468#include <float.h>
7469
7470int
7471main ()
7472{
7473
7474 ;
7475 return 0;
7476}
7477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007478if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479 ac_cv_header_stdc=yes
7480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7484
7485if test $ac_cv_header_stdc = yes; then
7486 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488/* end confdefs.h. */
7489#include <string.h>
7490
7491_ACEOF
7492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 $EGREP "memchr" >/dev/null 2>&1; then :
7494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495else
7496 ac_cv_header_stdc=no
7497fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007498rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499
7500fi
7501
7502if test $ac_cv_header_stdc = yes; then
7503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505/* end confdefs.h. */
7506#include <stdlib.h>
7507
7508_ACEOF
7509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007510 $EGREP "free" >/dev/null 2>&1; then :
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512else
7513 ac_cv_header_stdc=no
7514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007515rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516
7517fi
7518
7519if test $ac_cv_header_stdc = yes; then
7520 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522 :
7523else
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525/* end confdefs.h. */
7526#include <ctype.h>
7527#include <stdlib.h>
7528#if ((' ' & 0x0FF) == 0x020)
7529# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7530# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7531#else
7532# define ISLOWER(c) \
7533 (('a' <= (c) && (c) <= 'i') \
7534 || ('j' <= (c) && (c) <= 'r') \
7535 || ('s' <= (c) && (c) <= 'z'))
7536# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7537#endif
7538
7539#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7540int
7541main ()
7542{
7543 int i;
7544 for (i = 0; i < 256; i++)
7545 if (XOR (islower (i), ISLOWER (i))
7546 || toupper (i) != TOUPPER (i))
7547 return 2;
7548 return 0;
7549}
7550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if ac_fn_c_try_run "$LINENO"; then :
7552
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558fi
7559
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560fi
7561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7563$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564if test $ac_cv_header_stdc = yes; then
7565
Matthias Kloseb9621712010-04-24 17:59:49 +00007566$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567
7568fi
7569
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007570for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007571fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007572ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007573sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007574unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007575poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007576sys/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 +01007577sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007578sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007579sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007580sys/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 -07007581libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007582bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007583sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007584do :
7585 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7586ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007587if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007589#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007590_ACEOF
7591
7592fi
7593
Guido van Rossum627b2d71993-12-24 10:39:16 +00007594done
7595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007596ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007597for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7600$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007601if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007605/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007606#include <sys/types.h>
7607#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007608
Martin v. Löwis11437992002-04-12 09:54:03 +00007609int
7610main ()
7611{
7612if ((DIR *) 0)
7613return 0;
7614 ;
7615 return 0;
7616}
7617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625eval ac_res=\$$as_ac_Header
7626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7627$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007628if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007631_ACEOF
7632
7633ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007635
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007636done
7637# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7638if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7640$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007641if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007643else
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648/* Override any GCC internal prototype to avoid an error.
7649 Use char because int might match the return type of a GCC
7650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007651#ifdef __cplusplus
7652extern "C"
7653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007654char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007655int
7656main ()
7657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007658return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 ;
7660 return 0;
7661}
7662_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663for ac_lib in '' dir; do
7664 if test -z "$ac_lib"; then
7665 ac_res="none required"
7666 else
7667 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007668 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673rm -f core conftest.err conftest.$ac_objext \
7674 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007675 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678done
Victor Stinnere0be4232011-10-25 13:06:09 +02007679if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681else
7682 ac_cv_search_opendir=no
7683fi
7684rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007685LIBS=$ac_func_search_save_LIBS
7686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7688$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007690if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007694
Michael W. Hudson54241132001-12-07 15:38:26 +00007695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7697$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007698if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007700else
7701 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705/* Override any GCC internal prototype to avoid an error.
7706 Use char because int might match the return type of a GCC
7707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007708#ifdef __cplusplus
7709extern "C"
7710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007711char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007712int
7713main ()
7714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 ;
7717 return 0;
7718}
7719_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720for ac_lib in '' x; do
7721 if test -z "$ac_lib"; then
7722 ac_res="none required"
7723 else
7724 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730rm -f core conftest.err conftest.$ac_objext \
7731 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007732 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735done
Victor Stinnere0be4232011-10-25 13:06:09 +02007736if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738else
7739 ac_cv_search_opendir=no
7740fi
7741rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007742LIBS=$ac_func_search_save_LIBS
7743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7745$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007747if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750fi
7751
7752fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007753
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7755$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007756if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007760/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007761#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007762int
7763main ()
7764{
7765return makedev(0, 0);
7766 ;
7767 return 0;
7768}
7769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007771 ac_cv_header_sys_types_h_makedev=yes
7772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775rm -f core conftest.err conftest.$ac_objext \
7776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007777
7778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7780$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007781
7782if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007783ac_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 +02007784if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007785
Matthias Kloseb9621712010-04-24 17:59:49 +00007786$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007787
7788fi
7789
7790
7791
7792 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 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 +02007794if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007795
Matthias Kloseb9621712010-04-24 17:59:49 +00007796$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007797
7798fi
7799
7800
7801 fi
7802fi
7803
Michael W. Hudson54241132001-12-07 15:38:26 +00007804
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007805# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7806for ac_header in net/if.h
7807do :
7808 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7809#ifdef STDC_HEADERS
7810# include <stdlib.h>
7811# include <stddef.h>
7812#else
7813# ifdef HAVE_STDLIB_H
7814# include <stdlib.h>
7815# endif
7816#endif
7817#ifdef HAVE_SYS_SOCKET_H
7818# include <sys/socket.h>
7819#endif
7820
7821"
Victor Stinnere0be4232011-10-25 13:06:09 +02007822if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007823 cat >>confdefs.h <<_ACEOF
7824#define HAVE_NET_IF_H 1
7825_ACEOF
7826
7827fi
7828
7829done
7830
7831
Martin v. Löwis11017b12006-01-14 18:12:57 +00007832# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007833for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007834do :
7835 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 +00007836#ifdef HAVE_ASM_TYPES_H
7837#include <asm/types.h>
7838#endif
7839#ifdef HAVE_SYS_SOCKET_H
7840#include <sys/socket.h>
7841#endif
7842
Matthias Kloseb9621712010-04-24 17:59:49 +00007843"
Victor Stinnere0be4232011-10-25 13:06:09 +02007844if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007845 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007846#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007847_ACEOF
7848
7849fi
7850
7851done
7852
7853
Charles-François Natali47413c12011-10-06 19:47:44 +02007854# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007855for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007856do :
7857 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7858ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7859#ifdef HAVE_SYS_SOCKET_H
7860#include <sys/socket.h>
7861#endif
7862
7863"
7864if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7865 cat >>confdefs.h <<_ACEOF
7866#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7867_ACEOF
7868
7869fi
7870
7871done
7872
7873
Guido van Rossum627b2d71993-12-24 10:39:16 +00007874# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007875was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7877$as_echo_n "checking for clock_t in time.h... " >&6; }
7878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007880#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007881
7882_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007885 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007886else
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
7888
Matthias Kloseb9621712010-04-24 17:59:49 +00007889$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007890
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007891
Guido van Rossum627b2d71993-12-24 10:39:16 +00007892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007893rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007894
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7896$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007897
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7899$as_echo_n "checking for makedev... " >&6; }
7900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007901/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007902
Jesus Cea740f53a2010-04-28 11:35:30 +00007903#if defined(MAJOR_IN_MKDEV)
7904#include <sys/mkdev.h>
7905#elif defined(MAJOR_IN_SYSMACROS)
7906#include <sys/sysmacros.h>
7907#else
7908#include <sys/types.h>
7909#endif
7910
Neal Norwitz11690112002-07-30 01:08:28 +00007911int
7912main ()
7913{
Jesus Cea740f53a2010-04-28 11:35:30 +00007914
7915 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007916 ;
7917 return 0;
7918}
Matthias Kloseb159a552010-04-25 21:00:44 +00007919
Neal Norwitz11690112002-07-30 01:08:28 +00007920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007921if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007922 ac_cv_has_makedev=yes
7923else
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007926rm -f core conftest.err conftest.$ac_objext \
7927 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7929$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007930if test "$ac_cv_has_makedev" = "yes"; then
7931
Matthias Kloseb9621712010-04-24 17:59:49 +00007932$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007933
7934fi
7935
Christian Heimes985ecdc2013-11-20 11:46:18 +01007936# byte swapping
7937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7938$as_echo_n "checking for le64toh... " >&6; }
7939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7940/* end confdefs.h. */
7941
7942#ifdef HAVE_ENDIAN_H
7943#include <endian.h>
7944#elif defined(HAVE_SYS_ENDIAN_H)
7945#include <sys/endian.h>
7946#endif
7947
7948int
7949main ()
7950{
7951
7952 le64toh(1)
7953 ;
7954 return 0;
7955}
7956
7957_ACEOF
7958if ac_fn_c_try_link "$LINENO"; then :
7959 ac_cv_has_le64toh=yes
7960else
7961 ac_cv_has_le64toh=no
7962fi
7963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext conftest.$ac_ext
7965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7966$as_echo "$ac_cv_has_le64toh" >&6; }
7967if test "$ac_cv_has_le64toh" = "yes"; then
7968
7969$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7970
7971fi
7972
Martin v. Löwis399a6892002-10-04 10:22:02 +00007973# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7974# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7975# defined, but the compiler does not support pragma redefine_extname,
7976# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7977# structures (such as rlimit64) without declaring them. As a
7978# work-around, disable LFS on such configurations
7979
7980use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7982$as_echo_n "checking Solaris LFS bug... " >&6; }
7983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007985
7986#define _LARGEFILE_SOURCE 1
7987#define _FILE_OFFSET_BITS 64
7988#include <sys/resource.h>
7989
Martin v. Löwis399a6892002-10-04 10:22:02 +00007990int
7991main ()
7992{
7993struct rlimit foo;
7994 ;
7995 return 0;
7996}
7997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007999 sol_lfs_bug=no
8000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8005$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008006if test "$sol_lfs_bug" = "yes"; then
8007 use_lfs=no
8008fi
8009
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008010# Don't use largefile support for GNU/Hurd
8011case $ac_sys_system in GNU*)
8012 use_lfs=no
8013esac
8014
Martin v. Löwis399a6892002-10-04 10:22:02 +00008015if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008016# Two defines needed to enable largefile support on various platforms
8017# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008018case $ac_sys_system/$ac_sys_release in
8019AIX*)
8020
8021$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8022
8023 ;;
8024esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008027
8028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008030
Martin v. Löwis399a6892002-10-04 10:22:02 +00008031fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008032
Guido van Rossum84e7b241996-08-19 21:59:00 +00008033# Add some code to confdefs.h so that the test for off_t works on SCO
8034cat >> confdefs.h <<\EOF
8035#if defined(SCO_DS)
8036#undef _OFF_T
8037#endif
8038EOF
8039
Guido van Rossumef2255b2000-03-10 22:30:29 +00008040# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008041ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008042if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008044else
Martin v. Löwis11437992002-04-12 09:54:03 +00008045
8046cat >>confdefs.h <<_ACEOF
8047#define mode_t int
8048_ACEOF
8049
8050fi
8051
Matthias Kloseb9621712010-04-24 17:59:49 +00008052ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008053if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008055else
Martin v. Löwis11437992002-04-12 09:54:03 +00008056
8057cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008059_ACEOF
8060
8061fi
8062
Matthias Kloseb9621712010-04-24 17:59:49 +00008063ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066else
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
8068cat >>confdefs.h <<_ACEOF
8069#define pid_t int
8070_ACEOF
8071
8072fi
8073
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008076#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008077_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008080if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008082else
Martin v. Löwis11437992002-04-12 09:54:03 +00008083
8084cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008086_ACEOF
8087
8088fi
8089
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8091$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008092if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008094else
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008098
8099_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008102 ac_cv_type_uid_t=yes
8103else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008104 ac_cv_type_uid_t=no
8105fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008106rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8110$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008111if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112
Matthias Kloseb9621712010-04-24 17:59:49 +00008113$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
8115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008117
8118fi
8119
Mark Dickinson983bc162012-12-02 12:11:38 +00008120
8121# There are two separate checks for each of the exact-width integer types we
8122# need. First we check whether the type is available using the usual
8123# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8124# and <stdint.h> where available). We then also use the special type checks of
8125# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8126# directly, #define's uint32_t to be a suitable type.
8127
8128ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8129if test "x$ac_cv_type_uint32_t" = xyes; then :
8130
8131$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8132
8133fi
8134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8136case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008137 no|yes) ;; #(
8138 *)
8139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008141
8142
8143cat >>confdefs.h <<_ACEOF
8144#define uint32_t $ac_cv_c_uint32_t
8145_ACEOF
8146;;
8147 esac
8148
Mark Dickinson983bc162012-12-02 12:11:38 +00008149
8150ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8151if test "x$ac_cv_type_uint64_t" = xyes; then :
8152
8153$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8154
8155fi
8156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8158case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008159 no|yes) ;; #(
8160 *)
8161
Matthias Kloseb9621712010-04-24 17:59:49 +00008162$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008163
8164
8165cat >>confdefs.h <<_ACEOF
8166#define uint64_t $ac_cv_c_uint64_t
8167_ACEOF
8168;;
8169 esac
8170
Mark Dickinson983bc162012-12-02 12:11:38 +00008171
8172ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8173if test "x$ac_cv_type_int32_t" = xyes; then :
8174
8175$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8176
8177fi
8178
Matthias Kloseb9621712010-04-24 17:59:49 +00008179ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8180case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008181 no|yes) ;; #(
8182 *)
8183
8184cat >>confdefs.h <<_ACEOF
8185#define int32_t $ac_cv_c_int32_t
8186_ACEOF
8187;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008188esac
8189
Mark Dickinson983bc162012-12-02 12:11:38 +00008190
8191ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8192if test "x$ac_cv_type_int64_t" = xyes; then :
8193
8194$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8195
8196fi
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8199case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008200 no|yes) ;; #(
8201 *)
8202
8203cat >>confdefs.h <<_ACEOF
8204#define int64_t $ac_cv_c_int64_t
8205_ACEOF
8206;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008207esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008208
Mark Dickinson983bc162012-12-02 12:11:38 +00008209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008211if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008214
8215fi
8216
Stefan Krah1919b7e2012-03-21 18:25:23 +01008217ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8218if test "x$ac_cv_type___uint128_t" = xyes; then :
8219
8220$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8221
8222fi
8223
Jack Jansendd19cf82001-12-06 22:36:17 +00008224
Michael W. Hudson54241132001-12-07 15:38:26 +00008225# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008226# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227# The cast to long int works around a bug in the HP C Compiler
8228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8230# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8232$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008233if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 if test "$ac_cv_type_int" = yes; then
8240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008242as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008243See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 else
8245 ac_cv_sizeof_int=0
8246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8251$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252
8253
8254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008257_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258
8259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260# The cast to long int works around a bug in the HP C Compiler
8261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8263# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8265$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008266if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008268else
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271else
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 if test "$ac_cv_type_long" = yes; then
8273 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008275as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008276See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 else
8278 ac_cv_sizeof_long=0
8279 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8284$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285
8286
8287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008289#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008290_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008291
8292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# The cast to long int works around a bug in the HP C Compiler
8294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8296# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8298$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008299if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 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 +00008303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304else
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 if test "$ac_cv_type_void_p" = yes; then
8306 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008308as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008309See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310 else
8311 ac_cv_sizeof_void_p=0
8312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314
Martin v. Löwis11437992002-04-12 09:54:03 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8317$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318
8319
8320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008322#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008323_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008324
8325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326# The cast to long int works around a bug in the HP C Compiler
8327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8329# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8331$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008332if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008334else
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 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 +00008336
Martin v. Löwis11437992002-04-12 09:54:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 if test "$ac_cv_type_short" = yes; then
8339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008341as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008342See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343 else
8344 ac_cv_sizeof_short=0
8345 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8350$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351
8352
8353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008355#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008356_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008357
8358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359# The cast to long int works around a bug in the HP C Compiler
8360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8362# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8364$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008365if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 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 +00008369
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 if test "$ac_cv_type_float" = yes; then
8372 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008374as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008375See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376 else
8377 ac_cv_sizeof_float=0
8378 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8383$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384
8385
8386
Martin v. Löwis11437992002-04-12 09:54:03 +00008387cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008388#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008389_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008390
8391
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392# The cast to long int works around a bug in the HP C Compiler
8393# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8394# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8395# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8397$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008398if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 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 +00008402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 if test "$ac_cv_type_double" = yes; then
8405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008407as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008408See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409 else
8410 ac_cv_sizeof_double=0
8411 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413
Martin v. Löwis11437992002-04-12 09:54:03 +00008414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8416$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417
8418
8419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008421#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008422_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008423
8424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425# The cast to long int works around a bug in the HP C Compiler
8426# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8427# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8428# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8430$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008431if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008433else
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 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 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436else
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 if test "$ac_cv_type_fpos_t" = yes; then
8438 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008440as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008441See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 else
8443 ac_cv_sizeof_fpos_t=0
8444 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8449$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450
8451
8452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008454#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008455_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008456
Michael W. Hudson54241132001-12-07 15:38:26 +00008457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458# The cast to long int works around a bug in the HP C Compiler
8459# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8460# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8461# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8463$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008464if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008466else
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 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 +00008468
Martin v. Löwis18e16552006-02-15 17:27:45 +00008469else
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 if test "$ac_cv_type_size_t" = yes; then
8471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8472$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008473as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008474See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475 else
8476 ac_cv_sizeof_size_t=0
8477 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479
Martin v. Löwis18e16552006-02-15 17:27:45 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8482$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483
8484
8485
Martin v. Löwis18e16552006-02-15 17:27:45 +00008486cat >>confdefs.h <<_ACEOF
8487#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8488_ACEOF
8489
8490
Christian Heimes400adb02008-02-01 08:12:03 +00008491# The cast to long int works around a bug in the HP C Compiler
8492# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8493# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8494# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8496$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008497if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 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 +00008501
Christian Heimes400adb02008-02-01 08:12:03 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 if test "$ac_cv_type_pid_t" = yes; then
8504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008506as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008507See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008508 else
8509 ac_cv_sizeof_pid_t=0
8510 fi
8511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512
Christian Heimes400adb02008-02-01 08:12:03 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8515$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008516
8517
8518
8519cat >>confdefs.h <<_ACEOF
8520#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8521_ACEOF
8522
8523
Michael W. Hudson54241132001-12-07 15:38:26 +00008524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8526$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008527have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531int
8532main ()
8533{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008534long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ;
8536 return 0;
8537}
8538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
8541
Matthias Kloseb9621712010-04-24 17:59:49 +00008542$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008544 have_long_long=yes
8545
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8549$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008550if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551# The cast to long int works around a bug in the HP C Compiler
8552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8554# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8556$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008557if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Martin v. Löwis11437992002-04-12 09:54:03 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 if test "$ac_cv_type_long_long" = yes; then
8564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008566as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008567See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568 else
8569 ac_cv_sizeof_long_long=0
8570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572
Martin v. Löwis11437992002-04-12 09:54:03 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8575$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576
8577
8578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008581_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008582
Michael W. Hudson54241132001-12-07 15:38:26 +00008583
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584fi
8585
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8587$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008588have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008590/* end confdefs.h. */
8591
8592int
8593main ()
8594{
8595long double x; x = (long double)0;
8596 ;
8597 return 0;
8598}
8599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008600if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008601
8602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008604
8605 have_long_double=yes
8606
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008607fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8610$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008611if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008612# The cast to long int works around a bug in the HP C Compiler
8613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8617$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008618if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 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 +00008622
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 if test "$ac_cv_type_long_double" = yes; then
8625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008627as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008628See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008629 else
8630 ac_cv_sizeof_long_double=0
8631 fi
8632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8636$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008637
8638
8639
8640cat >>confdefs.h <<_ACEOF
8641#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8642_ACEOF
8643
8644
8645fi
8646
8647
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8649$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008650have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008652/* end confdefs.h. */
8653
8654int
8655main ()
8656{
8657_Bool x; x = (_Bool)0;
8658 ;
8659 return 0;
8660}
8661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008662if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008663
8664
Matthias Kloseb9621712010-04-24 17:59:49 +00008665$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008666
8667 have_c99_bool=yes
8668
Thomas Woutersb2137042007-02-01 18:02:27 +00008669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8672$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008673if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8679$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008680if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 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 +00008684
Thomas Woutersb2137042007-02-01 18:02:27 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type__Bool" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 else
8692 ac_cv_sizeof__Bool=0
8693 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Thomas Woutersb2137042007-02-01 18:02:27 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8698$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699
8700
8701
Thomas Woutersb2137042007-02-01 18:02:27 +00008702cat >>confdefs.h <<_ACEOF
8703#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8704_ACEOF
8705
8706
8707fi
8708
Matthias Kloseb9621712010-04-24 17:59:49 +00008709ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008710 #include <stdint.h>
8711 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008712 #ifdef HAVE_INTTYPES_H
8713 #include <inttypes.h>
8714 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008715"
Victor Stinnere0be4232011-10-25 13:06:09 +02008716if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008717
8718cat >>confdefs.h <<_ACEOF
8719#define HAVE_UINTPTR_T 1
8720_ACEOF
8721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722# The cast to long int works around a bug in the HP C Compiler
8723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8725# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8727$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008728if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008732
Martin v. Löwis11437992002-04-12 09:54:03 +00008733else
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 if test "$ac_cv_type_uintptr_t" = yes; then
8735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008737as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008738See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739 else
8740 ac_cv_sizeof_uintptr_t=0
8741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743
Martin v. Löwis11437992002-04-12 09:54:03 +00008744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8746$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008747
8748
8749
Martin v. Löwis11437992002-04-12 09:54:03 +00008750cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008751#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008752_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008753
Michael W. Hudson54241132001-12-07 15:38:26 +00008754
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008755fi
8756
Thomas Wouters89f507f2006-12-13 04:49:30 +00008757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758# The cast to long int works around a bug in the HP C Compiler
8759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8763$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008764if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008768#ifdef HAVE_SYS_TYPES_H
8769#include <sys/types.h>
8770#endif
8771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 if test "$ac_cv_type_off_t" = yes; then
8776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008778as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008779See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780 else
8781 ac_cv_sizeof_off_t=0
8782 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8787$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008788
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789
8790
Martin v. Löwis11437992002-04-12 09:54:03 +00008791cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008792#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008793_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008794
Michael W. Hudson54241132001-12-07 15:38:26 +00008795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8798$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008799if test "$have_long_long" = yes
8800then
8801if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008802 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8807$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008811fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8814$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008815fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008817# The cast to long int works around a bug in the HP C Compiler
8818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8822$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827#ifdef HAVE_SYS_TYPES_H
8828#include <sys/types.h>
8829#endif
8830#ifdef HAVE_TIME_H
8831#include <time.h>
8832#endif
8833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if test "$ac_cv_type_time_t" = yes; then
8838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008840as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008841See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842 else
8843 ac_cv_sizeof_time_t=0
8844 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8849$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
8852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008854#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008855_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008856
Michael W. Hudson54241132001-12-07 15:38:26 +00008857
8858
Trent Mick635f6fb2000-08-23 21:33:05 +00008859# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008860ac_save_cc="$CC"
8861if test "$ac_cv_kpthread" = "yes"
8862then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008863elif test "$ac_cv_kthread" = "yes"
8864then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008865elif test "$ac_cv_pthread" = "yes"
8866then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008867fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8870$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008871have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008874
8875 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008876int
8877main ()
8878{
Guido van Rossum12580492000-09-24 16:47:19 +00008879pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ;
8881 return 0;
8882}
Matthias Kloseb159a552010-04-25 21:00:44 +00008883
Martin v. Löwis11437992002-04-12 09:54:03 +00008884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008885if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008886 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8890$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008891if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8897$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008898if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902#ifdef HAVE_PTHREAD_H
8903#include <pthread.h>
8904#endif
8905
Matthias Kloseb9621712010-04-24 17:59:49 +00008906"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 if test "$ac_cv_type_pthread_t" = yes; then
8910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008912as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008913See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914 else
8915 ac_cv_sizeof_pthread_t=0
8916 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918
Trent Mick635f6fb2000-08-23 21:33:05 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8921$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008922
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923
8924
Martin v. Löwis11437992002-04-12 09:54:03 +00008925cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008926#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008927_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929
Trent Mick635f6fb2000-08-23 21:33:05 +00008930fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008931CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008932
Michael W. Hudson54241132001-12-07 15:38:26 +00008933
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008934case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008935 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008936 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8937 ;;
8938 Darwin/*)
8939 OTHER_LIBTOOL_OPT=""
8940 ;;
8941esac
8942
8943
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008944
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008945case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008946 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008947 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8948 if test "${enable_universalsdk}"; then
8949 :
8950 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008951 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008952 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008953 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008955 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008956 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008957 if test ${gcc_version} '<' 4.0
8958 then
8959 LIBTOOL_CRUFT="-lcc_dynamic"
8960 else
8961 LIBTOOL_CRUFT=""
8962 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008964 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008968
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008969 #include <unistd.h>
8970 int main(int argc, char*argv[])
8971 {
8972 if (sizeof(long) == 4) {
8973 return 0;
8974 } else {
8975 return 1;
8976 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008977 }
8978
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008980if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008981 ac_osx_32bit=yes
8982else
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008987fi
8988
8989
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008991 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008992 i386)
8993 MACOSX_DEFAULT_ARCH="i386"
8994 ;;
8995 ppc)
8996 MACOSX_DEFAULT_ARCH="ppc"
8997 ;;
8998 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008999 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000 ;;
9001 esac
9002 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009003 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009004 i386)
9005 MACOSX_DEFAULT_ARCH="x86_64"
9006 ;;
9007 ppc)
9008 MACOSX_DEFAULT_ARCH="ppc64"
9009 ;;
9010 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009011 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009012 ;;
9013 esac
9014
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015 fi
9016
9017 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009018 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009019 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009020esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9022$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009023if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009024then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009025 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009027 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009030
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9032$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009033 if test $enable_shared = "yes"
9034 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009035 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 +00009036 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009040fi
9041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9043$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009044case $ac_sys_system/$ac_sys_release in
9045 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009046
Matthias Kloseb9621712010-04-24 17:59:49 +00009047$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009048
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9050$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009051 ;;
9052 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009055 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009056esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009057
Guido van Rossum0a516c91994-09-12 10:58:40 +00009058# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009059
Michael W. Hudson54241132001-12-07 15:38:26 +00009060
9061
9062
9063
Benjamin Peterson99f03762010-04-11 22:15:28 +00009064
Thomas Wouters477c8d52006-05-27 19:21:47 +00009065
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009066# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9067# -- usually .so, .sl on HP-UX, .dll on Cygwin
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9069$as_echo_n "checking the extension of shared libraries... " >&6; }
9070if test -z "$SHLIB_SUFFIX"; then
9071 case $ac_sys_system in
9072 hp*|HP*)
9073 case `uname -m` in
9074 ia64) SHLIB_SUFFIX=.so;;
9075 *) SHLIB_SUFFIX=.sl;;
9076 esac
9077 ;;
9078 CYGWIN*) SHLIB_SUFFIX=.dll;;
9079 *) SHLIB_SUFFIX=.so;;
9080 esac
9081fi
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9083$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009084
Guido van Rossum0a516c91994-09-12 10:58:40 +00009085# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009086# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009087# (Shared libraries in this instance are shared modules to be loaded into
9088# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9090$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009091if test -z "$LDSHARED"
9092then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009093 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009094 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009095 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009096 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009097 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009098 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009099 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009101 if test "$GCC" = "yes" ; then
9102 LDSHARED='$(CC) -shared'
9103 LDCXXSHARED='$(CXX) -shared'
9104 else
9105 LDSHARED='$(CC) -G'
9106 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009107 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009108 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009109 if test "$GCC" = "yes" ; then
9110 LDSHARED='$(CC) -shared'
9111 LDCXXSHARED='$(CXX) -shared'
9112 else
9113 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009114 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009115 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009116 LDSHARED='$(CC) -bundle'
9117 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009118 if test "$enable_framework" ; then
9119 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009120 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9121 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009122 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009123 else
9124 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009125 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009126 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009127 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009128 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009129 LDSHARED='$(CC) -bundle'
9130 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009131 if test "$enable_framework" ; then
9132 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009133 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9134 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009135 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009136 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009137 # No framework, use the Python app as bundle-loader
9138 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009139 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009141 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009142 Darwin/*)
9143 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9144 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009145
Ned Deily36820b62014-06-25 13:44:22 -07009146 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9147 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9148 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9149 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9150 if test ${dep_target_major} -eq 10 && \
9151 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009152 then
Ned Deily36820b62014-06-25 13:44:22 -07009153 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009154 LDSHARED='$(CC) -bundle'
9155 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009156 if test "$enable_framework" ; then
9157 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009158 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9159 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009160 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009161 else
9162 # No framework, use the Python app as bundle-loader
9163 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9164 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009165 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009166 fi
Ned Deily36820b62014-06-25 13:44:22 -07009167 else
9168 # building for OS X 10.3 and later
9169 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9170 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9171 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009172 fi
9173 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009174 Linux*|GNU*|QNX*)
9175 LDSHARED='$(CC) -shared'
9176 LDCXXSHARED='$(CXX) -shared';;
9177 BSD/OS*/4*)
9178 LDSHARED="gcc -shared"
9179 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009180 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009181 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009182 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009183 LDSHARED='$(CC) -shared'
9184 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009185 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009186 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009187 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009188 OpenBSD*)
9189 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9190 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009191 LDSHARED='$(CC) -shared $(CCSHARED)'
9192 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009193 else
9194 case `uname -r` in
9195 [01].* | 2.[0-7] | 2.[0-7].*)
9196 LDSHARED="ld -Bshareable ${LDFLAGS}"
9197 ;;
9198 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009199 LDSHARED='$(CC) -shared $(CCSHARED)'
9200 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009201 ;;
9202 esac
9203 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009204 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009205 LDSHARED='$(CC) -shared'
9206 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009207 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009208 if test "$GCC" = "yes" ; then
9209 LDSHARED='$(CC) -shared'
9210 LDCXXSHARED='$(CXX) -shared'
9211 else
9212 LDSHARED='$(CC) -G'
9213 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009214 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009215 SCO_SV*)
9216 LDSHARED='$(CC) -Wl,-G,-Bexport'
9217 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9218 CYGWIN*)
9219 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9220 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009221 *) LDSHARED="ld";;
9222 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9225$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009226LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009227BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009228# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009229# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9231$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009232if test -z "$CCSHARED"
9233then
Guido van Rossum07397971997-04-29 21:49:50 +00009234 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009235 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009236 then CCSHARED="-fPIC";
9237 elif test `uname -p` = sparc;
9238 then CCSHARED="-xcode=pic32";
9239 else CCSHARED="-Kpic";
9240 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009241 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009242 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009243 else CCSHARED="+z";
9244 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009245 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009246 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009247 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009248 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009249 if test "$GCC" = "yes"
9250 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009251 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009252 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009253 SCO_SV*)
9254 if test "$GCC" = "yes"
9255 then CCSHARED="-fPIC"
9256 else CCSHARED="-Kpic -belf"
9257 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009258 IRIX*/6*) case $CC in
9259 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009260 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009261 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009262 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9265$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009266# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009267# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9269$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009270if test -z "$LINKFORSHARED"
9271then
Guido van Rossum07397971997-04-29 21:49:50 +00009272 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009273 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009274 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009275 LINKFORSHARED="-Wl,-E -Wl,+s";;
9276# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009277 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009278 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009281 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009282
9283 # Issue #18075: the default maximum stack size (8MBytes) is too
9284 # small for the default recursion limit. Increase the stack size
9285 # to ensure that tests don't crash
9286 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9287
Jack Jansene578a632001-08-15 01:27:14 +00009288 if test "$enable_framework"
9289 then
Jack Jansenda49e192005-01-07 13:08:22 +00009290 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009291 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009292 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009293 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009294 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009295 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009296 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009297 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9298 then
9299 LINKFORSHARED="-Wl,--export-dynamic"
9300 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009301 SunOS/5*) case $CC in
9302 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009303 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009304 then
9305 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009306 fi;;
9307 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009308 CYGWIN*)
9309 if test $enable_shared = "no"
9310 then
9311 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9312 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009313 QNX*)
9314 # -Wl,-E causes the symbols to be added to the dynamic
9315 # symbol table so that they can be found when a module
9316 # is loaded. -N 2048K causes the stack size to be set
9317 # to 2048 kilobytes so that the stack doesn't overflow
9318 # when running test_compile.py.
9319 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9323$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324
Michael W. Hudson54241132001-12-07 15:38:26 +00009325
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009326
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9328$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009329if test ! "$LIBRARY" = "$LDLIBRARY"
9330then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009331 case $ac_sys_system in
9332 CYGWIN*)
9333 # Cygwin needs CCSHARED when building extension DLLs
9334 # but not when building the interpreter DLL.
9335 CFLAGSFORSHARED='';;
9336 *)
9337 CFLAGSFORSHARED='$(CCSHARED)'
9338 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9341$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009342
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009343# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9344# library (with --enable-shared).
9345# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009346# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9347# if it is not required, since it creates a dependency of the shared library
9348# to LIBS. This, in turn, means that applications linking the shared libpython
9349# don't need to link LIBS explicitly. The default should be only changed
9350# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9353$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009354case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009355 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009356 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9359$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009360
9361
Guido van Rossum627b2d71993-12-24 10:39:16 +00009362# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9364$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009365if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009366 $as_echo_n "(cached) " >&6
9367else
9368 ac_check_lib_save_LIBS=$LIBS
9369LIBS="-lsendfile $LIBS"
9370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9371/* end confdefs.h. */
9372
9373/* Override any GCC internal prototype to avoid an error.
9374 Use char because int might match the return type of a GCC
9375 builtin and then its argument prototype would still apply. */
9376#ifdef __cplusplus
9377extern "C"
9378#endif
9379char sendfile ();
9380int
9381main ()
9382{
9383return sendfile ();
9384 ;
9385 return 0;
9386}
9387_ACEOF
9388if ac_fn_c_try_link "$LINENO"; then :
9389 ac_cv_lib_sendfile_sendfile=yes
9390else
9391 ac_cv_lib_sendfile_sendfile=no
9392fi
9393rm -f core conftest.err conftest.$ac_objext \
9394 conftest$ac_exeext conftest.$ac_ext
9395LIBS=$ac_check_lib_save_LIBS
9396fi
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9398$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009399if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009400 cat >>confdefs.h <<_ACEOF
9401#define HAVE_LIBSENDFILE 1
9402_ACEOF
9403
9404 LIBS="-lsendfile $LIBS"
9405
9406fi
9407
Matthias Kloseb9621712010-04-24 17:59:49 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9409$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009410if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009412else
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009414LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418/* Override any GCC internal prototype to avoid an error.
9419 Use char because int might match the return type of a GCC
9420 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009421#ifdef __cplusplus
9422extern "C"
9423#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009424char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009425int
9426main ()
9427{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 ;
9430 return 0;
9431}
9432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009435else
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009438rm -f core conftest.err conftest.$ac_objext \
9439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009440LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9443$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009444if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 cat >>confdefs.h <<_ACEOF
9446#define HAVE_LIBDL 1
9447_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009449 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009451fi
9452 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9454$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009455if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009457else
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009459LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463/* Override any GCC internal prototype to avoid an error.
9464 Use char because int might match the return type of a GCC
9465 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009466#ifdef __cplusplus
9467extern "C"
9468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009469char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009470int
9471main ()
9472{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 ;
9475 return 0;
9476}
9477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009478if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480else
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009483rm -f core conftest.err conftest.$ac_objext \
9484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009485LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9488$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009489if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 cat >>confdefs.h <<_ACEOF
9491#define HAVE_LIBDLD 1
9492_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009493
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009494 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009496fi
9497 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009498
Georg Brandlb1441c72009-01-03 22:33:39 +00009499# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009500if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9502$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009503if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009505else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009506 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510/* Override any GCC internal prototype to avoid an error.
9511 Use char because int might match the return type of a GCC
9512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009513#ifdef __cplusplus
9514extern "C"
9515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009516char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ;
9522 return 0;
9523}
9524_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525for ac_lib in '' pthread rt posix4; do
9526 if test -z "$ac_lib"; then
9527 ac_res="none required"
9528 else
9529 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009537 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009538 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540done
Victor Stinnere0be4232011-10-25 13:06:09 +02009541if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543else
9544 ac_cv_search_sem_init=no
9545fi
9546rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009547LIBS=$ac_func_search_save_LIBS
9548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9550$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009552if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009554
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009555fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009556 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009557 # posix4 on Solaris 2.6
9558 # pthread (first!) on Linux
9559fi
9560
Martin v. Löwis19d17342003-06-14 21:03:05 +00009561# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9563$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009564if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009565 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009566else
9567 ac_check_lib_save_LIBS=$LIBS
9568LIBS="-lintl $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öwis19d17342003-06-14 21:03:05 +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öwis19d17342003-06-14 21:03:05 +00009575#ifdef __cplusplus
9576extern "C"
9577#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009578char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009579int
9580main ()
9581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009583 ;
9584 return 0;
9585}
9586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009588 ac_cv_lib_intl_textdomain=yes
9589else
Matthias Kloseb9621712010-04-24 17:59:49 +00009590 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009592rm -f core conftest.err conftest.$ac_objext \
9593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009594LIBS=$ac_check_lib_save_LIBS
9595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9597$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009598if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009599
Matthias Kloseb9621712010-04-24 17:59:49 +00009600$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009601
Brett Cannonc6d936e2009-06-07 20:09:53 +00009602 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009603fi
9604
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009605
9606# checks for system dependent C++ extensions support
9607case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9609$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009612
Georg Brandl59e87bd2011-02-15 19:48:59 +00009613 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009614int
9615main ()
9616{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009617loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 ;
9619 return 0;
9620}
Matthias Kloseb159a552010-04-25 21:00:44 +00009621
Martin v. Löwis11437992002-04-12 09:54:03 +00009622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009624
Matthias Kloseb159a552010-04-25 21:00:44 +00009625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009627
Matthias Kloseb159a552010-04-25 21:00:44 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009629$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009630
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009631else
Matthias Kloseb159a552010-04-25 21:00:44 +00009632
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009634$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009635
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009637rm -f core conftest.err conftest.$ac_objext \
9638 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009639 *) ;;
9640esac
9641
Christian Heimes985ecdc2013-11-20 11:46:18 +01009642# check for systems that require aligned memory access
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9644$as_echo_n "checking aligned memory access is required... " >&6; }
9645if test "$cross_compiling" = yes; then :
9646 aligned_required=yes
9647else
9648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9649/* end confdefs.h. */
9650
9651int main()
9652{
9653 char s[16];
9654 int i, *p1, *p2;
9655 for (i=0; i < 16; i++)
9656 s[i] = i;
9657 p1 = (int*)(s+1);
9658 p2 = (int*)(s+2);
9659 if (*p1 == *p2)
9660 return 1;
9661 return 0;
9662}
9663
9664_ACEOF
9665if ac_fn_c_try_run "$LINENO"; then :
9666 aligned_required=no
9667else
9668 aligned_required=yes
9669fi
9670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9671 conftest.$ac_objext conftest.beam conftest.$ac_ext
9672fi
9673
9674
9675if test "$aligned_required" = yes ; then
9676
9677$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9678
9679fi
9680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9681$as_echo "$aligned_required" >&6; }
9682
9683
9684# str, bytes and memoryview hash algorithm
9685
9686
9687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9688$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9689
9690# Check whether --with-hash_algorithm was given.
9691if test "${with_hash_algorithm+set}" = set; then :
9692 withval=$with_hash_algorithm;
9693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9694$as_echo "$withval" >&6; }
9695case "$withval" in
9696 siphash24)
9697 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9698
9699 ;;
9700 fnv)
9701 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9702
9703 ;;
9704 *)
9705 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9706 ;;
9707esac
9708
9709else
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9711$as_echo "default" >&6; }
9712fi
9713
9714
Charles-François Natalid30b0222014-05-08 23:08:51 +01009715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9716$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9717
9718# Check whether --with-address_sanitizer was given.
9719if test "${with_address_sanitizer+set}" = set; then :
9720 withval=$with_address_sanitizer;
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9722$as_echo "$withval" >&6; }
9723BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9724LDFLAGS="-fsanitize=address $LDFLAGS"
9725
9726else
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728$as_echo "no" >&6; }
9729fi
9730
9731
Guido van Rossum70c7f481998-03-26 18:44:10 +00009732# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9734$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009735if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009737else
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009739LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743/* Override any GCC internal prototype to avoid an error.
9744 Use char because int might match the return type of a GCC
9745 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009746#ifdef __cplusplus
9747extern "C"
9748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009749char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009750int
9751main ()
9752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ;
9755 return 0;
9756}
9757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009760else
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009763rm -f core conftest.err conftest.$ac_objext \
9764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009765LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9768$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009769if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009770 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009771fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009772 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9774$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009775if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009777else
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009779LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783/* Override any GCC internal prototype to avoid an error.
9784 Use char because int might match the return type of a GCC
9785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786#ifdef __cplusplus
9787extern "C"
9788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009789char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009790int
9791main ()
9792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009800else
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009803rm -f core conftest.err conftest.$ac_objext \
9804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9808$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009809if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009810 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009811fi
9812 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9815$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009818if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9821$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009822LIBS="$withval $LIBS"
9823
9824else
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827fi
9828
Guido van Rossum7f43da71994-08-01 12:15:30 +00009829
Victor Stinner8291b5e2015-03-20 16:03:14 +01009830
9831
9832
9833
9834
9835
9836
9837if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9838 if test -n "$ac_tool_prefix"; then
9839 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9840set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9842$as_echo_n "checking for $ac_word... " >&6; }
9843if ${ac_cv_path_PKG_CONFIG+:} false; then :
9844 $as_echo_n "(cached) " >&6
9845else
9846 case $PKG_CONFIG in
9847 [\\/]* | ?:[\\/]*)
9848 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9849 ;;
9850 *)
9851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9852for as_dir in $PATH
9853do
9854 IFS=$as_save_IFS
9855 test -z "$as_dir" && as_dir=.
9856 for ac_exec_ext in '' $ac_executable_extensions; do
9857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9858 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9860 break 2
9861 fi
9862done
9863 done
9864IFS=$as_save_IFS
9865
9866 ;;
9867esac
9868fi
9869PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9870if test -n "$PKG_CONFIG"; then
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9872$as_echo "$PKG_CONFIG" >&6; }
9873else
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9875$as_echo "no" >&6; }
9876fi
9877
9878
9879fi
9880if test -z "$ac_cv_path_PKG_CONFIG"; then
9881 ac_pt_PKG_CONFIG=$PKG_CONFIG
9882 # Extract the first word of "pkg-config", so it can be a program name with args.
9883set dummy pkg-config; ac_word=$2
9884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9885$as_echo_n "checking for $ac_word... " >&6; }
9886if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9887 $as_echo_n "(cached) " >&6
9888else
9889 case $ac_pt_PKG_CONFIG in
9890 [\\/]* | ?:[\\/]*)
9891 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9892 ;;
9893 *)
9894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9895for as_dir in $PATH
9896do
9897 IFS=$as_save_IFS
9898 test -z "$as_dir" && as_dir=.
9899 for ac_exec_ext in '' $ac_executable_extensions; do
9900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9901 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9903 break 2
9904 fi
9905done
9906 done
9907IFS=$as_save_IFS
9908
9909 ;;
9910esac
9911fi
9912ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9913if test -n "$ac_pt_PKG_CONFIG"; then
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9915$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9916else
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9918$as_echo "no" >&6; }
9919fi
9920
9921 if test "x$ac_pt_PKG_CONFIG" = x; then
9922 PKG_CONFIG=""
9923 else
9924 case $cross_compiling:$ac_tool_warned in
9925yes:)
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9927$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9928ac_tool_warned=yes ;;
9929esac
9930 PKG_CONFIG=$ac_pt_PKG_CONFIG
9931 fi
9932else
9933 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9934fi
9935
9936fi
9937if test -n "$PKG_CONFIG"; then
9938 _pkg_min_version=0.9.0
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9940$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9941 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9943$as_echo "yes" >&6; }
9944 else
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
9947 PKG_CONFIG=""
9948 fi
9949fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009950
9951# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9953$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009954
9955# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009956if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009957 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009958else
9959 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009960fi
9961
9962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9964$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009965
9966# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9968$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009969
9970# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009972 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009973else
9974 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009975fi
9976
9977
9978if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009979 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9980else
9981 LIBFFI_INCLUDEDIR=""
9982fi
9983
9984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9986$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009987
Stefan Krah60187b52012-03-23 19:06:27 +01009988# Check for use of the system libmpdec library
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9990$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9991
9992# Check whether --with-system_libmpdec was given.
9993if test "${with_system_libmpdec+set}" = set; then :
9994 withval=$with_system_libmpdec;
9995else
9996 with_system_libmpdec="no"
9997fi
9998
9999
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10001$as_echo "$with_system_libmpdec" >&6; }
10002
Benjamin Peterson076ed002010-10-31 17:11:02 +000010003# Check for support for loadable sqlite extensions
10004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10005$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10006# Check whether --enable-loadable-sqlite-extensions was given.
10007if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10008 enableval=$enable_loadable_sqlite_extensions;
10009else
10010 enable_loadable_sqlite_extensions="no"
10011fi
10012
10013
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10015$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10016
Ned Deilyd819b932013-09-06 01:07:05 -070010017# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10018
10019
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10021$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10022
10023# Check whether --with-tcltk-includes was given.
10024if test "${with_tcltk_includes+set}" = set; then :
10025 withval=$with_tcltk_includes;
10026else
10027 with_tcltk_includes="default"
10028fi
10029
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10031$as_echo "$with_tcltk_includes" >&6; }
10032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10033$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10034
10035# Check whether --with-tcltk-libs was given.
10036if test "${with_tcltk_libs+set}" = set; then :
10037 withval=$with_tcltk_libs;
10038else
10039 with_tcltk_libs="default"
10040fi
10041
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10043$as_echo "$with_tcltk_libs" >&6; }
10044if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10045then
10046 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10047 then
10048 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10049 fi
10050 TCLTK_INCLUDES=""
10051 TCLTK_LIBS=""
10052else
10053 TCLTK_INCLUDES="$with_tcltk_includes"
10054 TCLTK_LIBS="$with_tcltk_libs"
10055fi
10056
Matthias Klose55708cc2009-04-30 08:06:49 +000010057# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10059$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010060
10061# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010062if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010063 withval=$with_dbmliborder;
10064if test x$with_dbmliborder = xyes
10065then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010066as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010067else
10068 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10069 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010071 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010072 fi
10073 done
10074fi
10075fi
10076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10078$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010079
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010080# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010081
10082
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10084$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088 withval=$with_signal_module;
10089fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010090
10091
10092if test -z "$with_signal_module"
10093then with_signal_module="yes"
10094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10096$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010097
10098if test "${with_signal_module}" = "yes"; then
10099 USE_SIGNAL_MODULE=""
10100 SIGNAL_OBJS=""
10101else
10102 USE_SIGNAL_MODULE="#"
10103 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10104fi
10105
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010106# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010107
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010108USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110
Martin v. Löwis11437992002-04-12 09:54:03 +000010111
10112# Templates for things AC_DEFINEd more than once.
10113# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010114
10115
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10118$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010121if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122 withval=$with_threads;
10123fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010124
10125
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010126# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010129if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130 withval=$with_thread; with_threads=$with_thread
10131fi
10132
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010133
10134if test -z "$with_threads"
10135then with_threads="yes"
10136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10138$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010139
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010140
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010141if test "$with_threads" = "no"
10142then
10143 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010144elif test "$ac_cv_pthread_is_default" = yes
10145then
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010147
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010148 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010150
10151 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010153elif test "$ac_cv_kpthread" = "yes"
10154then
10155 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010156 if test "$ac_cv_cxx_thread" = "yes"; then
10157 CXX="$CXX -Kpthread"
10158 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010161 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010162 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010163elif test "$ac_cv_kthread" = "yes"
10164then
10165 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010166 if test "$ac_cv_cxx_thread" = "yes"; then
10167 CXX="$CXX -Kthread"
10168 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010170
10171 posix_threads=yes
10172 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010173elif test "$ac_cv_pthread" = "yes"
10174then
10175 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010176 if test "$ac_cv_cxx_thread" = "yes"; then
10177 CXX="$CXX -pthread"
10178 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010180
10181 posix_threads=yes
10182 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010183else
10184 if test ! -z "$with_threads" -a -d "$with_threads"
10185 then LDFLAGS="$LDFLAGS -L$with_threads"
10186 fi
10187 if test ! -z "$withval" -a -d "$withval"
10188 then LDFLAGS="$LDFLAGS -L$withval"
10189 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010190
10191 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010192 # define _POSIX_THREADS in unistd.h. Some apparently don't
10193 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10195$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010198
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010199#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010200#ifdef _POSIX_THREADS
10201yes
10202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010203
10204_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010207 unistd_defines_pthreads=yes
10208else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010209 unistd_defines_pthreads=no
10210fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010211rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010212
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10214$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010215
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010217
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010218 # Just looking for pthread_create in libpthread is not enough:
10219 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10220 # So we really have to include pthread.h, and then link.
10221 _libs=$LIBS
10222 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10224$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010227
10228#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010229#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010230
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010231void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010232int
10233main ()
10234{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010235
10236pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ;
10238 return 0;
10239}
10240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010242
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10244$as_echo "yes" >&6; }
10245 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010246
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010249else
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010251 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010253if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010255
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010256 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010257 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010258else
Guido van Rossumad678af1998-10-02 14:42:15 +000010259
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10261$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010262if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010266LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270/* Override any GCC internal prototype to avoid an error.
10271 Use char because int might match the return type of a GCC
10272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010273#ifdef __cplusplus
10274extern "C"
10275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010276char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
10279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 ;
10282 return 0;
10283}
10284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010287else
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010290rm -f core conftest.err conftest.$ac_objext \
10291 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010292LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10295$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010296if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010298
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010299 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010300 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010301 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010302else
Greg Steinadf63d62000-07-05 10:38:09 +000010303
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10305$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010306if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010308else
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010310LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314/* Override any GCC internal prototype to avoid an error.
10315 Use char because int might match the return type of a GCC
10316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010317#ifdef __cplusplus
10318extern "C"
10319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010320char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010321int
10322main ()
10323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ;
10326 return 0;
10327}
10328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010331else
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010334rm -f core conftest.err conftest.$ac_objext \
10335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010336LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10339$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010340if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010343 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010344 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010345 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010346else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10349$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010350if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010352else
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010354LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010358/* Override any GCC internal prototype to avoid an error.
10359 Use char because int might match the return type of a GCC
10360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010361#ifdef __cplusplus
10362extern "C"
10363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010364char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010365int
10366main ()
10367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378rm -f core conftest.err conftest.$ac_objext \
10379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010380LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10383$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010384if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010385 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010387 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010388 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010389 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010390else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10393$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010394if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010398LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010402/* Override any GCC internal prototype to avoid an error.
10403 Use char because int might match the return type of a GCC
10404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405#ifdef __cplusplus
10406extern "C"
10407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010408char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010409int
10410main ()
10411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010419else
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010422rm -f core conftest.err conftest.$ac_objext \
10423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010424LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10427$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010428if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010430
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010431 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010432 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010433 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010434else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010435
Martin v. Löwis130fb172001-07-19 11:00:41 +000010436 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010437fi
10438
Guido van Rossum627b2d71993-12-24 10:39:16 +000010439
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010440fi
10441
Guido van Rossum0be3e491997-05-22 20:33:33 +000010442fi
10443
Guido van Rossum49545951997-12-02 19:28:29 +000010444fi
10445
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446fi
10447
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010449rm -f core conftest.err conftest.$ac_objext \
10450 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010451
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10453$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010454if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010456else
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010458LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462/* Override any GCC internal prototype to avoid an error.
10463 Use char because int might match the return type of a GCC
10464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010465#ifdef __cplusplus
10466extern "C"
10467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010468char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010469int
10470main ()
10471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010472return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 ;
10474 return 0;
10475}
10476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010479else
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010482rm -f core conftest.err conftest.$ac_objext \
10483 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010484LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10487$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010488if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010490
Martin v. Löwis130fb172001-07-19 11:00:41 +000010491 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010492 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010493 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010494fi
10495
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010496
Neal Norwitza978ab02002-11-02 16:58:05 +000010497 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10499$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010500if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010502else
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010504LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508/* Override any GCC internal prototype to avoid an error.
10509 Use char because int might match the return type of a GCC
10510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010511#ifdef __cplusplus
10512extern "C"
10513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010514char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010515int
10516main ()
10517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 ;
10520 return 0;
10521}
10522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010523if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010525else
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010528rm -f core conftest.err conftest.$ac_objext \
10529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010530LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10533$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010534if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010536
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010537 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010538 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010539 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010540fi
10541
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010542 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010543fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010544
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545if test "$posix_threads" = "yes"; then
10546 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549
10550 fi
10551
10552 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10553 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010554 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010555$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010556
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557 ;;
10558 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560
10561 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010562 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010563$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010564
10565 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010566 esac
10567
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10569$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010570 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574 ac_cv_pthread_system_supported=no
10575else
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010577/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010578
10579 #include <stdio.h>
10580 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010581 void *foo(void *parm) {
10582 return NULL;
10583 }
10584 main() {
10585 pthread_attr_t attr;
10586 pthread_t id;
10587 if (pthread_attr_init(&attr)) exit(-1);
10588 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10589 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10590 exit(0);
10591 }
10592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010593if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594 ac_cv_pthread_system_supported=yes
10595else
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602
Guido van Rossum627b2d71993-12-24 10:39:16 +000010603fi
10604
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10606$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607 if test "$ac_cv_pthread_system_supported" = "yes"; then
10608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610
10611 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 for ac_func in pthread_sigmask
10613do :
10614 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010615if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010616 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010619 case $ac_sys_system in
10620 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010623
10624 ;;
10625 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626fi
10627done
10628
Christian Heimesf77b4b22013-08-21 13:26:05 +020010629 for ac_func in pthread_atfork
10630do :
10631 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10632if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10633 cat >>confdefs.h <<_ACEOF
10634#define HAVE_PTHREAD_ATFORK 1
10635_ACEOF
10636
10637fi
10638done
10639
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010640fi
10641
10642
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10646$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653 ipv6=no
10654 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10656$as_echo "yes" >&6; }
10657 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010658
10659 ipv6=yes
10660 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662else
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010666 /* AF_INET6 available check */
10667#include <sys/types.h>
10668#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010669int
10670main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010672int domain = AF_INET6;
10673 ;
10674 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675}
Martin v. Löwis11437992002-04-12 09:54:03 +000010676_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010677if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10680$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010681 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010682
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683else
Matthias Kloseb159a552010-04-25 21:00:44 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010688
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010692if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10694$as_echo_n "checking if RFC2553 API is available... " >&6; }
10695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010696/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010697
10698 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010699#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010703struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010704 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
Matthias Kloseb159a552010-04-25 21:00:44 +000010708
Martin v. Löwis11437992002-04-12 09:54:03 +000010709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010710if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010711
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010713$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010714 ipv6=yes
10715
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010716else
Matthias Kloseb159a552010-04-25 21:00:44 +000010717
10718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010720 ipv6=no
10721
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010724fi
10725
10726if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010728
10729fi
10730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731fi
10732
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733
10734ipv6type=unknown
10735ipv6lib=none
10736ipv6trylibc=no
10737
10738if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10740$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010741 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10742 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743 case $i in
10744 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748#include <netinet/in.h>
10749#ifdef IPV6_INRIA_VERSION
10750yes
10751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010752_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010755 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010757rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758
10759 ;;
10760 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010762/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764#include <netinet/in.h>
10765#ifdef __KAME__
10766yes
10767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010768_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771 ipv6type=$i;
10772 ipv6lib=inet6
10773 ipv6libdir=/usr/local/v6/lib
10774 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010776rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777
10778 ;;
10779 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783#include <features.h>
10784#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10785yes
10786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010787_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790 ipv6type=$i;
10791 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010793rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794
10795 ;;
10796 linux-inet6)
10797 if test -d /usr/inet6; then
10798 ipv6type=$i
10799 ipv6lib=inet6
10800 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010801 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802 fi
10803 ;;
10804 solaris)
10805 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010806 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807 ipv6type=$i
10808 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 fi
10810 fi
10811 ;;
10812 toshiba)
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 <sys/param.h>
10817#ifdef _TOSHIBA_INET6
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;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010825 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010827rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828
10829 ;;
10830 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010832/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010833
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834#include </usr/local/v6/include/sys/v6config.h>
10835#ifdef __V6D__
10836yes
10837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010838_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841 ipv6type=$i;
10842 ipv6lib=v6;
10843 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010844 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010846rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847
10848 ;;
10849 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010851/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853#include <sys/param.h>
10854#ifdef _ZETA_MINAMI_INET6
10855yes
10856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010857_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860 ipv6type=$i;
10861 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010862 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010864rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865
10866 ;;
10867 esac
10868 if test "$ipv6type" != "unknown"; then
10869 break
10870 fi
10871 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10873$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874fi
10875
10876if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10877 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10878 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10879 echo "using lib$ipv6lib"
10880 else
10881 if test $ipv6trylibc = "yes"; then
10882 echo "using libc"
10883 else
10884 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10885 echo "You need to fetch lib$ipv6lib.a from appropriate"
10886 echo 'ipv6 kit and compile beforehand.'
10887 exit 1
10888 fi
10889 fi
10890fi
10891
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10893$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10895/* end confdefs.h. */
10896 /* CAN_RAW_FD_FRAMES available check */
10897#include <linux/can/raw.h>
10898int
10899main ()
10900{
10901int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10902 ;
10903 return 0;
10904}
10905_ACEOF
10906if ac_fn_c_try_compile "$LINENO"; then :
10907
10908
10909$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10910
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10912$as_echo "yes" >&6; }
10913
10914else
10915
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918
10919fi
10920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10923$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010925/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010926
10927 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010928int
10929main ()
10930{
10931FSIORefNum fRef = 0
10932 ;
10933 return 0;
10934}
Matthias Kloseb159a552010-04-25 21:00:44 +000010935
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010937if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010938
Matthias Kloseb159a552010-04-25 21:00:44 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10943$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010944
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010945else
Matthias Kloseb159a552010-04-25 21:00:44 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010949
10950fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10952
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010953# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10955$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010958if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959 withval=$with_doc_strings;
10960fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010961
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010962
10963if test -z "$with_doc_strings"
10964then with_doc_strings="yes"
10965fi
10966if test "$with_doc_strings" != "no"
10967then
10968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010970
10971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10973$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010974
Antoine Pitrou042b1282010-08-13 21:15:58 +000010975# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10977$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010980if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010982if test "$withval" != no
10983then
10984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10988$as_echo "yes" >&6; }
10989else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010991fi
10992else
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995fi
10996
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010997
10998# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11000$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011003if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 withval=$with_pymalloc;
11005fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011006
Neil Schemenauera35c6882001-02-27 04:45:05 +000011007
Neil Schemenauer16c22972002-03-22 15:34:49 +000011008if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011009then
11010 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011011fi
11012if test "$with_pymalloc" != "no"
11013then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011016
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011017 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11020$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011021
Benjamin Peterson05159c42009-12-03 03:01:27 +000011022# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11024$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011025
11026# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011027if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011028 withval=$with_valgrind;
11029else
11030 with_valgrind=no
11031fi
11032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11034$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 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 +020011037if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011040
11041else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011042 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011043
11044fi
11045
11046
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011047 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048fi
11049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011050# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011051
Guido van Rossum98935bf2001-09-05 19:13:16 +000011052DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011053
Guido van Rossume97ee181999-12-20 21:27:22 +000011054# the dlopen() function means we might want to use dynload_shlib.o. some
11055# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011056for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011057do :
11058 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011059if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011061#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011062_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011063
Guido van Rossume97ee181999-12-20 21:27:22 +000011064fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011065done
Guido van Rossume97ee181999-12-20 21:27:22 +000011066
Michael W. Hudson54241132001-12-07 15:38:26 +000011067
Guido van Rossume97ee181999-12-20 21:27:22 +000011068# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11069# loading of modules.
11070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11072$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011073if test -z "$DYNLOADFILE"
11074then
11075 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011076 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11077 if test "$ac_cv_func_dlopen" = yes
11078 then DYNLOADFILE="dynload_shlib.o"
11079 else DYNLOADFILE="dynload_aix.o"
11080 fi
11081 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011082 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011083 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11084 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011085 *)
11086 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11087 # out any dynamic loading
11088 if test "$ac_cv_func_dlopen" = yes
11089 then DYNLOADFILE="dynload_shlib.o"
11090 else DYNLOADFILE="dynload_stub.o"
11091 fi
11092 ;;
11093 esac
11094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11096$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011097if test "$DYNLOADFILE" != "dynload_stub.o"
11098then
Martin v. Löwis11437992002-04-12 09:54:03 +000011099
Matthias Kloseb9621712010-04-24 17:59:49 +000011100$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011101
11102fi
11103
Neil Schemenauer4e425612001-06-19 15:44:15 +000011104# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11105
Michael W. Hudson54241132001-12-07 15:38:26 +000011106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11108$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011109if test -z "$MACHDEP_OBJS"
11110then
Jack Jansene578a632001-08-15 01:27:14 +000011111 MACHDEP_OBJS=$extra_machdep_objs
11112else
11113 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011114fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011115if test -z "$MACHDEP_OBJS"; then
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11117$as_echo "none" >&6; }
11118else
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11120$as_echo "$MACHDEP_OBJS" >&6; }
11121fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011122
Guido van Rossum627b2d71993-12-24 10:39:16 +000011123# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011124for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011125 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011126 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011127 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011128 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011129 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011130 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011131 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11132 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011133 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011134 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011135 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011136 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011137 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011138 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011139 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11140 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011141 sigaction sigaltstack siginterrupt sigpending sigrelse \
11142 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011143 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011144 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011145 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011146do :
11147 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11148ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011149if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011154fi
11155done
11156
Michael W. Hudson54241132001-12-07 15:38:26 +000011157
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011158ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11159 #include <dirent.h>
11160"
11161if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11162
11163$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11164
11165fi
11166
11167
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011168# For some functions, having a definition is not sufficient, since
11169# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11171$as_echo_n "checking for chroot... " >&6; }
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011174#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175int
11176main ()
11177{
11178void *x=chroot
11179 ;
11180 return 0;
11181}
11182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011184
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186
Matthias Kloseb159a552010-04-25 21:00:44 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011189else
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11191$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011192
11193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11196$as_echo_n "checking for link... " >&6; }
11197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011198/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011199#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011200int
11201main ()
11202{
11203void *x=link
11204 ;
11205 return 0;
11206}
11207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211
Matthias Kloseb159a552010-04-25 21:00:44 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011214else
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011217
11218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11221$as_echo_n "checking for symlink... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011224#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225int
11226main ()
11227{
11228void *x=symlink
11229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236
Matthias Kloseb159a552010-04-25 21:00:44 +000011237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011239else
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011242
11243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11246$as_echo_n "checking for fchdir... " >&6; }
11247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011249#include <unistd.h>
11250int
11251main ()
11252{
11253void *x=fchdir
11254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011261
Matthias Kloseb159a552010-04-25 21:00:44 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011264else
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011267
11268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11271$as_echo_n "checking for fsync... " >&6; }
11272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011274#include <unistd.h>
11275int
11276main ()
11277{
11278void *x=fsync
11279 ;
11280 return 0;
11281}
11282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286
Matthias Kloseb159a552010-04-25 21:00:44 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011292
11293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11296$as_echo_n "checking for fdatasync... " >&6; }
11297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011299#include <unistd.h>
11300int
11301main ()
11302{
11303void *x=fdatasync
11304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011311
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011317
11318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11321$as_echo_n "checking for epoll... " >&6; }
11322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011323/* end confdefs.h. */
11324#include <sys/epoll.h>
11325int
11326main ()
11327{
11328void *x=epoll_create
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011342
11343fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11346$as_echo_n "checking for epoll_create1... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11348/* end confdefs.h. */
11349#include <sys/epoll.h>
11350int
11351main ()
11352{
11353void *x=epoll_create1
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358if ac_fn_c_try_compile "$LINENO"; then :
11359
11360$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11361
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11363$as_echo "yes" >&6; }
11364else
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11366$as_echo "no" >&6; }
11367
11368fi
11369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11371$as_echo_n "checking for kqueue... " >&6; }
11372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011373/* end confdefs.h. */
11374
11375#include <sys/types.h>
11376#include <sys/event.h>
11377
11378int
11379main ()
11380{
11381int x=kqueue()
11382 ;
11383 return 0;
11384}
11385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011389
Matthias Kloseb159a552010-04-25 21:00:44 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011392else
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011395
11396fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11399$as_echo_n "checking for prlimit... " >&6; }
11400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11401/* end confdefs.h. */
11402
11403#include <sys/time.h>
11404#include <sys/resource.h>
11405
11406int
11407main ()
11408{
11409void *x=prlimit
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414if ac_fn_c_try_compile "$LINENO"; then :
11415
11416$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11417
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11419$as_echo "yes" >&6; }
11420else
11421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
11423
11424fi
11425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11426
Martin v. Löwisd5843682002-11-21 20:41:28 +000011427# On some systems (eg. FreeBSD 5), we would find a definition of the
11428# functions ctermid_r, setgroups in the library, but no prototype
11429# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11430# address to avoid compiler warnings and potential miscompilations
11431# because of the missing prototypes.
11432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11434$as_echo_n "checking for ctermid_r... " >&6; }
11435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437
Martin v. Löwisd5843682002-11-21 20:41:28 +000011438#include <stdio.h>
11439
Martin v. Löwisd5843682002-11-21 20:41:28 +000011440int
11441main ()
11442{
11443void* p = ctermid_r
11444 ;
11445 return 0;
11446}
11447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011451
Matthias Kloseb159a552010-04-25 21:00:44 +000011452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011453$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011454else
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11456$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011457
11458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11460
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11462$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011463if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011464 $as_echo_n "(cached) " >&6
11465else
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011468#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011469int
11470main ()
11471{
11472void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011473
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011479 ac_cv_flock_decl=yes
11480else
11481 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011482
11483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011485
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011486fi
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11488$as_echo "$ac_cv_flock_decl" >&6; }
11489if test "x${ac_cv_flock_decl}" = xyes; then
11490 for ac_func in flock
11491do :
11492 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011493if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011494 cat >>confdefs.h <<_ACEOF
11495#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011496_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011497
Antoine Pitroua3000072010-09-07 14:52:42 +000011498else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011500$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011501if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011502 $as_echo_n "(cached) " >&6
11503else
11504 ac_check_lib_save_LIBS=$LIBS
11505LIBS="-lbsd $LIBS"
11506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11507/* end confdefs.h. */
11508
11509/* Override any GCC internal prototype to avoid an error.
11510 Use char because int might match the return type of a GCC
11511 builtin and then its argument prototype would still apply. */
11512#ifdef __cplusplus
11513extern "C"
11514#endif
11515char flock ();
11516int
11517main ()
11518{
11519return flock ();
11520 ;
11521 return 0;
11522}
11523_ACEOF
11524if ac_fn_c_try_link "$LINENO"; then :
11525 ac_cv_lib_bsd_flock=yes
11526else
11527 ac_cv_lib_bsd_flock=no
11528fi
11529rm -f core conftest.err conftest.$ac_objext \
11530 conftest$ac_exeext conftest.$ac_ext
11531LIBS=$ac_check_lib_save_LIBS
11532fi
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11534$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011535if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011536 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011537
11538
11539$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11540
11541
11542fi
11543
11544
11545fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011546done
11547
Antoine Pitroua3000072010-09-07 14:52:42 +000011548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549
Matthias Kloseb9621712010-04-24 17:59:49 +000011550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11551$as_echo_n "checking for getpagesize... " >&6; }
11552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011555#include <unistd.h>
11556
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011557int
11558main ()
11559{
11560void* p = getpagesize
11561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011568
Matthias Kloseb159a552010-04-25 21:00:44 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011574
11575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011577
Victor Stinner984890f2011-11-24 13:53:38 +010011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11579$as_echo_n "checking for broken unsetenv... " >&6; }
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11581/* end confdefs.h. */
11582
11583#include <stdlib.h>
11584
11585int
11586main ()
11587{
11588int res = unsetenv("DUMMY")
11589 ;
11590 return 0;
11591}
11592_ACEOF
11593if ac_fn_c_try_compile "$LINENO"; then :
11594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
11596else
11597
11598$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11599
11600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11601$as_echo "yes" >&6; }
11602
11603fi
11604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11605
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011606for ac_prog in true
11607do
11608 # Extract the first word of "$ac_prog", so it can be a program name with args.
11609set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11611$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011612if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011614else
11615 if test -n "$TRUE"; then
11616 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11617else
11618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11619for as_dir in $PATH
11620do
11621 IFS=$as_save_IFS
11622 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011625 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011626 $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 +000011627 break 2
11628 fi
11629done
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011632
11633fi
11634fi
11635TRUE=$ac_cv_prog_TRUE
11636if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11638$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011639else
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11641$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011642fi
11643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011644
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011645 test -n "$TRUE" && break
11646done
11647test -n "$TRUE" || TRUE="/bin/true"
11648
11649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11651$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011652if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654else
11655 ac_check_lib_save_LIBS=$LIBS
11656LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011658/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011660/* Override any GCC internal prototype to avoid an error.
11661 Use char because int might match the return type of a GCC
11662 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011663#ifdef __cplusplus
11664extern "C"
11665#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011666char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011667int
11668main ()
11669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011671 ;
11672 return 0;
11673}
11674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011676 ac_cv_lib_c_inet_aton=yes
11677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011680rm -f core conftest.err conftest.$ac_objext \
11681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011682LIBS=$ac_check_lib_save_LIBS
11683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11685$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011686if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011687 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011688else
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11690$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011691if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693else
11694 ac_check_lib_save_LIBS=$LIBS
11695LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011699/* Override any GCC internal prototype to avoid an error.
11700 Use char because int might match the return type of a GCC
11701 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702#ifdef __cplusplus
11703extern "C"
11704#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011705char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011706int
11707main ()
11708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011710 ;
11711 return 0;
11712}
11713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715 ac_cv_lib_resolv_inet_aton=yes
11716else
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011719rm -f core conftest.err conftest.$ac_objext \
11720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011721LIBS=$ac_check_lib_save_LIBS
11722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11724$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011725if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011726 cat >>confdefs.h <<_ACEOF
11727#define HAVE_LIBRESOLV 1
11728_ACEOF
11729
11730 LIBS="-lresolv $LIBS"
11731
11732fi
11733
11734
11735fi
11736
11737
Christian Heimesd0764e22007-12-04 15:00:33 +000011738# On Tru64, chflags seems to be present, but calling it will
11739# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11741$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011746 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011749/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011750
Christian Heimesd0764e22007-12-04 15:00:33 +000011751#include <sys/stat.h>
11752#include <unistd.h>
11753int main(int argc, char*argv[])
11754{
11755 if(chflags(argv[0], 0) != 0)
11756 return 1;
11757 return 0;
11758}
Ned Deily3eb67d52011-06-28 00:00:28 -070011759
Christian Heimesd0764e22007-12-04 15:00:33 +000011760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011762 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011768fi
11769
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011770
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11773$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011774if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011776if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011777 ac_cv_have_chflags="yes"
11778else
11779 ac_cv_have_chflags="no"
11780fi
11781
11782fi
11783if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011786
11787fi
11788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11790$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011791if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011795 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011798/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011799
Christian Heimesd0764e22007-12-04 15:00:33 +000011800#include <sys/stat.h>
11801#include <unistd.h>
11802int main(int argc, char*argv[])
11803{
11804 if(lchflags(argv[0], 0) != 0)
11805 return 1;
11806 return 0;
11807}
Ned Deily3eb67d52011-06-28 00:00:28 -070011808
Christian Heimesd0764e22007-12-04 15:00:33 +000011809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011811 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011817fi
11818
11819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11822$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011823if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011825if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011826 ac_cv_have_lchflags="yes"
11827else
11828 ac_cv_have_lchflags="no"
11829fi
11830
11831fi
11832if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011833
Matthias Kloseb9621712010-04-24 17:59:49 +000011834$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011835
11836fi
11837
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011838case $ac_sys_system/$ac_sys_release in
11839Darwin/*)
11840 _CUR_CFLAGS="${CFLAGS}"
11841 _CUR_LDFLAGS="${LDFLAGS}"
11842 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11843 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11844 ;;
11845esac
11846
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11848$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011849if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011851else
11852 ac_check_lib_save_LIBS=$LIBS
11853LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011855/* end confdefs.h. */
11856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857/* Override any GCC internal prototype to avoid an error.
11858 Use char because int might match the return type of a GCC
11859 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011860#ifdef __cplusplus
11861extern "C"
11862#endif
11863char inflateCopy ();
11864int
11865main ()
11866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011867return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011868 ;
11869 return 0;
11870}
11871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011872if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011873 ac_cv_lib_z_inflateCopy=yes
11874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011877rm -f core conftest.err conftest.$ac_objext \
11878 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011879LIBS=$ac_check_lib_save_LIBS
11880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11882$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011883if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011886
11887fi
11888
11889
11890case $ac_sys_system/$ac_sys_release in
11891Darwin/*)
11892 CFLAGS="${_CUR_CFLAGS}"
11893 LDFLAGS="${_CUR_LDFLAGS}"
11894 ;;
11895esac
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11898$as_echo_n "checking for hstrerror... " >&6; }
11899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011900/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011901
Martin v. Löwise9416172003-05-03 10:12:45 +000011902#include <netdb.h>
11903
Martin v. Löwise9416172003-05-03 10:12:45 +000011904int
11905main ()
11906{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011907void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011915
Matthias Kloseb159a552010-04-25 21:00:44 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011921
11922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011923rm -f core conftest.err conftest.$ac_objext \
11924 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11927$as_echo_n "checking for inet_aton... " >&6; }
11928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011929/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011930
Martin v. Löwis86d66262006-02-17 08:40:11 +000011931#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011932#include <sys/socket.h>
11933#include <netinet/in.h>
11934#include <arpa/inet.h>
11935
Martin v. Löwise9416172003-05-03 10:12:45 +000011936int
11937main ()
11938{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011939void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011940 ;
11941 return 0;
11942}
11943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011947
Matthias Kloseb159a552010-04-25 21:00:44 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11952$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011953
11954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011955rm -f core conftest.err conftest.$ac_objext \
11956 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11959$as_echo_n "checking for inet_pton... " >&6; }
11960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011961/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011962
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011963#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011964#include <sys/socket.h>
11965#include <netinet/in.h>
11966#include <arpa/inet.h>
11967
Martin v. Löwise9416172003-05-03 10:12:45 +000011968int
11969main ()
11970{
11971void* p = inet_pton
11972 ;
11973 return 0;
11974}
11975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011976if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011979
Matthias Kloseb159a552010-04-25 21:00:44 +000011980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011982else
Matthias Kloseb9621712010-04-24 17:59:49 +000011983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11984$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011985
11986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011988
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011989# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11991$as_echo_n "checking for setgroups... " >&6; }
11992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011993/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011994
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011995#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011996#ifdef HAVE_GRP_H
11997#include <grp.h>
11998#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011999
Martin v. Löwisd5843682002-11-21 20:41:28 +000012000int
12001main ()
12002{
12003void* p = setgroups
12004 ;
12005 return 0;
12006}
12007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012011
Matthias Kloseb159a552010-04-25 21:00:44 +000012012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012013$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012014else
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12016$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012017
12018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012020
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012021# check for openpty and forkpty
12022
12023for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012024do :
12025 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012026if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012030
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12033$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012034if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012036else
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012038LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042/* Override any GCC internal prototype to avoid an error.
12043 Use char because int might match the return type of a GCC
12044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012045#ifdef __cplusplus
12046extern "C"
12047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012048char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012049int
12050main ()
12051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 ;
12054 return 0;
12055}
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012062rm -f core conftest.err conftest.$ac_objext \
12063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012064LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12067$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012068if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012070 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12073$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012074if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012076else
12077 ac_check_lib_save_LIBS=$LIBS
12078LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012080/* end confdefs.h. */
12081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082/* Override any GCC internal prototype to avoid an error.
12083 Use char because int might match the return type of a GCC
12084 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012085#ifdef __cplusplus
12086extern "C"
12087#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012088char openpty ();
12089int
12090main ()
12091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012093 ;
12094 return 0;
12095}
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012098 ac_cv_lib_bsd_openpty=yes
12099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102rm -f core conftest.err conftest.$ac_objext \
12103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012104LIBS=$ac_check_lib_save_LIBS
12105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12107$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012110 LIBS="$LIBS -lbsd"
12111fi
12112
12113
12114fi
12115
Fred Drake8cef4cf2000-06-28 16:40:38 +000012116
12117fi
12118done
12119
12120for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012121do :
12122 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012123if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012125#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012126_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012127
Fred Drake8cef4cf2000-06-28 16:40:38 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12130$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012131if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133else
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139/* Override any GCC internal prototype to avoid an error.
12140 Use char because int might match the return type of a GCC
12141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012142#ifdef __cplusplus
12143extern "C"
12144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012145char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012146int
12147main ()
12148{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 ;
12151 return 0;
12152}
12153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012159rm -f core conftest.err conftest.$ac_objext \
12160 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012161LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12164$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012165if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012168else
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12170$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012173else
12174 ac_check_lib_save_LIBS=$LIBS
12175LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012177/* end confdefs.h. */
12178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012179/* Override any GCC internal prototype to avoid an error.
12180 Use char because int might match the return type of a GCC
12181 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012182#ifdef __cplusplus
12183extern "C"
12184#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012185char forkpty ();
12186int
12187main ()
12188{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012190 ;
12191 return 0;
12192}
12193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012195 ac_cv_lib_bsd_forkpty=yes
12196else
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012199rm -f core conftest.err conftest.$ac_objext \
12200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201LIBS=$ac_check_lib_save_LIBS
12202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12204$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012205if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012207 LIBS="$LIBS -lbsd"
12208fi
12209
12210
12211fi
12212
Fred Drake8cef4cf2000-06-28 16:40:38 +000012213
12214fi
12215done
12216
Jack Jansendd19cf82001-12-06 22:36:17 +000012217
Christian Heimesb186d002008-03-18 15:15:01 +000012218# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012219for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012220do :
12221 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012222if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012225_ACEOF
12226
12227fi
12228done
12229
12230
Michael W. Hudson54241132001-12-07 15:38:26 +000012231# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012233do :
12234 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12235ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012236if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012239_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012241fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242done
12243
Michael W. Hudson54241132001-12-07 15:38:26 +000012244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012245ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012246if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012247 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012248
Martin v. Löwis1142de32002-03-29 16:28:31 +000012249else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012251 *" dup2.$ac_objext "* ) ;;
12252 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012254esac
12255
Martin v. Löwis1142de32002-03-29 16:28:31 +000012256fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012257
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012258ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012259if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012260 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12261
12262else
12263 case " $LIBOBJS " in
12264 *" strdup.$ac_objext "* ) ;;
12265 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12266 ;;
12267esac
12268
12269fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012270
12271
12272for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012273do :
12274 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012275if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012281#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012285getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 ;
12287 return 0;
12288}
12289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012293
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012296
Guido van Rossum627b2d71993-12-24 10:39:16 +000012297fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012298done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012299
Jack Jansen150753c2003-03-29 22:07:47 +000012300for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012301do :
12302 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012304 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012309#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012310int
12311main ()
12312{
12313setpgrp(0,0);
12314 ;
12315 return 0;
12316}
12317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
Matthias Kloseb9621712010-04-24 17:59:49 +000012320$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012321
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012324
12325fi
12326done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012327
Thomas Wouters3a584202000-08-05 23:28:51 +000012328for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012329do :
12330 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012331if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012333#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012336/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012338int
12339main ()
12340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012341gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 ;
12343 return 0;
12344}
12345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_compile "$LINENO"; then :
12347
Guido van Rossum627b2d71993-12-24 10:39:16 +000012348else
Skip Montanaro6dead952003-09-25 14:50:04 +000012349
Matthias Kloseb9621712010-04-24 17:59:49 +000012350$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012351
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Guido van Rossum627b2d71993-12-24 10:39:16 +000012353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012356fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012357done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012358
Michael W. Hudson54241132001-12-07 15:38:26 +000012359
Victor Stinnere0be4232011-10-25 13:06:09 +020012360for ac_func in clock_gettime
12361do :
12362 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12363if test "x$ac_cv_func_clock_gettime" = xyes; then :
12364 cat >>confdefs.h <<_ACEOF
12365#define HAVE_CLOCK_GETTIME 1
12366_ACEOF
12367
12368else
12369
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12371$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12372if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12373 $as_echo_n "(cached) " >&6
12374else
12375 ac_check_lib_save_LIBS=$LIBS
12376LIBS="-lrt $LIBS"
12377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12378/* end confdefs.h. */
12379
12380/* Override any GCC internal prototype to avoid an error.
12381 Use char because int might match the return type of a GCC
12382 builtin and then its argument prototype would still apply. */
12383#ifdef __cplusplus
12384extern "C"
12385#endif
12386char clock_gettime ();
12387int
12388main ()
12389{
12390return clock_gettime ();
12391 ;
12392 return 0;
12393}
12394_ACEOF
12395if ac_fn_c_try_link "$LINENO"; then :
12396 ac_cv_lib_rt_clock_gettime=yes
12397else
12398 ac_cv_lib_rt_clock_gettime=no
12399fi
12400rm -f core conftest.err conftest.$ac_objext \
12401 conftest$ac_exeext conftest.$ac_ext
12402LIBS=$ac_check_lib_save_LIBS
12403fi
12404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12405$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12406if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12407
Victor Stinner7efb8332014-08-29 15:41:08 +020012408 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12410
12411
12412$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12413
12414
12415fi
12416
12417
12418fi
12419done
12420
12421
12422for ac_func in clock_getres
12423do :
12424 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12425if test "x$ac_cv_func_clock_getres" = xyes; then :
12426 cat >>confdefs.h <<_ACEOF
12427#define HAVE_CLOCK_GETRES 1
12428_ACEOF
12429
12430else
12431
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12433$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12434if ${ac_cv_lib_rt_clock_getres+:} false; then :
12435 $as_echo_n "(cached) " >&6
12436else
12437 ac_check_lib_save_LIBS=$LIBS
12438LIBS="-lrt $LIBS"
12439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440/* end confdefs.h. */
12441
12442/* Override any GCC internal prototype to avoid an error.
12443 Use char because int might match the return type of a GCC
12444 builtin and then its argument prototype would still apply. */
12445#ifdef __cplusplus
12446extern "C"
12447#endif
12448char clock_getres ();
12449int
12450main ()
12451{
12452return clock_getres ();
12453 ;
12454 return 0;
12455}
12456_ACEOF
12457if ac_fn_c_try_link "$LINENO"; then :
12458 ac_cv_lib_rt_clock_getres=yes
12459else
12460 ac_cv_lib_rt_clock_getres=no
12461fi
12462rm -f core conftest.err conftest.$ac_objext \
12463 conftest$ac_exeext conftest.$ac_ext
12464LIBS=$ac_check_lib_save_LIBS
12465fi
12466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12467$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12468if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12469
12470 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12471
12472
12473fi
12474
12475
12476fi
12477done
12478
12479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12481$as_echo_n "checking for major... " >&6; }
12482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012483/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012484
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012485#if defined(MAJOR_IN_MKDEV)
12486#include <sys/mkdev.h>
12487#elif defined(MAJOR_IN_SYSMACROS)
12488#include <sys/sysmacros.h>
12489#else
12490#include <sys/types.h>
12491#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012492
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012493int
12494main ()
12495{
12496
12497 makedev(major(0),minor(0));
12498
12499 ;
12500 return 0;
12501}
12502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012504
12505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12509$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012510
12511else
Skip Montanaro6dead952003-09-25 14:50:04 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12514$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012515
12516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012517rm -f core conftest.err conftest.$ac_objext \
12518 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012519
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012520# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012521# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12523$as_echo_n "checking for getaddrinfo... " >&6; }
12524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012526
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012527#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012528#include <sys/socket.h>
12529#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012530#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012531
Martin v. Löwis11437992002-04-12 09:54:03 +000012532int
12533main ()
12534{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012535getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 ;
12537 return 0;
12538}
12539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012541 have_getaddrinfo=yes
12542else
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012545rm -f core conftest.err conftest.$ac_objext \
12546 conftest$ac_exeext conftest.$ac_ext
12547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12548$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012549if test $have_getaddrinfo = yes
12550then
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12552$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012553 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012557
12558if test "${enable_ipv6+set}" = set; then
12559 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12560else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012561 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012562fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012565/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012566
Stefan Krah19c21392012-11-22 23:47:32 +010012567#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012568#include <sys/types.h>
12569#include <netdb.h>
12570#include <string.h>
12571#include <sys/socket.h>
12572#include <netinet/in.h>
12573
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012574int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012575{
12576 int passive, gaierr, inet4 = 0, inet6 = 0;
12577 struct addrinfo hints, *ai, *aitop;
12578 char straddr[INET6_ADDRSTRLEN], strport[16];
12579
12580 for (passive = 0; passive <= 1; passive++) {
12581 memset(&hints, 0, sizeof(hints));
12582 hints.ai_family = AF_UNSPEC;
12583 hints.ai_flags = passive ? AI_PASSIVE : 0;
12584 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012585 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012586 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12587 (void)gai_strerror(gaierr);
12588 goto bad;
12589 }
12590 for (ai = aitop; ai; ai = ai->ai_next) {
12591 if (ai->ai_addr == NULL ||
12592 ai->ai_addrlen == 0 ||
12593 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12594 straddr, sizeof(straddr), strport, sizeof(strport),
12595 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12596 goto bad;
12597 }
12598 switch (ai->ai_family) {
12599 case AF_INET:
12600 if (strcmp(strport, "54321") != 0) {
12601 goto bad;
12602 }
12603 if (passive) {
12604 if (strcmp(straddr, "0.0.0.0") != 0) {
12605 goto bad;
12606 }
12607 } else {
12608 if (strcmp(straddr, "127.0.0.1") != 0) {
12609 goto bad;
12610 }
12611 }
12612 inet4++;
12613 break;
12614 case AF_INET6:
12615 if (strcmp(strport, "54321") != 0) {
12616 goto bad;
12617 }
12618 if (passive) {
12619 if (strcmp(straddr, "::") != 0) {
12620 goto bad;
12621 }
12622 } else {
12623 if (strcmp(straddr, "::1") != 0) {
12624 goto bad;
12625 }
12626 }
12627 inet6++;
12628 break;
12629 case AF_UNSPEC:
12630 goto bad;
12631 break;
12632 default:
12633 /* another family support? */
12634 break;
12635 }
12636 }
12637 }
12638
12639 if (!(inet4 == 0 || inet4 == 2))
12640 goto bad;
12641 if (!(inet6 == 0 || inet6 == 2))
12642 goto bad;
12643
12644 if (aitop)
12645 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012646 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012647
12648 bad:
12649 if (aitop)
12650 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012651 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012652}
12653
Martin v. Löwis11437992002-04-12 09:54:03 +000012654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012655if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012656 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012664fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012665
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12669$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12670
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012671if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012672then
12673 if test $ipv6 = yes
12674 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012675 echo 'Fatal: You must get working getaddrinfo() function.'
12676 echo ' or you can specify "--disable-ipv6"'.
12677 exit 1
12678 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012679else
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012682
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012684
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012685for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012686do :
12687 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012688if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012690#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012691_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012692
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012693fi
12694done
12695
Michael W. Hudson54241132001-12-07 15:38:26 +000012696
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12699$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012700if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012705#include <sys/types.h>
12706#include <sys/time.h>
12707#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
12712if ((struct tm *) 0)
12713return 0;
12714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012720else
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12726$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012727if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Matthias Kloseb9621712010-04-24 17:59:49 +000012729$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730
12731fi
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12734$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012735if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740#include <sys/types.h>
12741#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Martin v. Löwis11437992002-04-12 09:54:03 +000012743int
12744main ()
12745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746struct tm tm;
12747 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ;
12750 return 0;
12751}
12752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012753if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754 ac_cv_struct_tm=time.h
12755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12761$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012762if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765
12766fi
12767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768ac_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 +000012769#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771"
Victor Stinnere0be4232011-10-25 13:06:09 +020012772if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
12774cat >>confdefs.h <<_ACEOF
12775#define HAVE_STRUCT_TM_TM_ZONE 1
12776_ACEOF
12777
12778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012780
Martin v. Löwis11437992002-04-12 09:54:03 +000012781if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784
12785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12787"
Victor Stinnere0be4232011-10-25 13:06:09 +020012788if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792fi
12793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012795#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796_ACEOF
12797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12799$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012800if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012804/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012805#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806#if !HAVE_DECL_TZNAME
12807extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ;
12815 return 0;
12816}
12817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012818if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819 ac_cv_var_tzname=yes
12820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012823rm -f core conftest.err conftest.$ac_objext \
12824 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12827$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012828 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012831
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832 fi
12833fi
12834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835ac_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 +020012836if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012837
12838cat >>confdefs.h <<_ACEOF
12839#define HAVE_STRUCT_STAT_ST_RDEV 1
12840_ACEOF
12841
12842
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012843fi
12844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845ac_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 +020012846if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012847
Martin v. Löwis11437992002-04-12 09:54:03 +000012848cat >>confdefs.h <<_ACEOF
12849#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12850_ACEOF
12851
12852
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012853fi
12854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855ac_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 +020012856if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012857
12858cat >>confdefs.h <<_ACEOF
12859#define HAVE_STRUCT_STAT_ST_FLAGS 1
12860_ACEOF
12861
12862
12863fi
12864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865ac_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 +020012866if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012867
12868cat >>confdefs.h <<_ACEOF
12869#define HAVE_STRUCT_STAT_ST_GEN 1
12870_ACEOF
12871
12872
12873fi
12874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875ac_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 +020012876if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012877
12878cat >>confdefs.h <<_ACEOF
12879#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12880_ACEOF
12881
12882
12883fi
12884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885ac_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 +020012886if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012887
Martin v. Löwis11437992002-04-12 09:54:03 +000012888cat >>confdefs.h <<_ACEOF
12889#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12890_ACEOF
12891
12892
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012893fi
12894
Stefan Krah267b6392016-04-26 01:09:18 +020012895ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12896 #include <sys/types.h>
12897 #include <pwd.h>
12898
12899"
12900if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12901
12902cat >>confdefs.h <<_ACEOF
12903#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12904_ACEOF
12905
12906
12907fi
12908ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12909 #include <sys/types.h>
12910 #include <pwd.h>
12911
12912"
12913if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12914
12915cat >>confdefs.h <<_ACEOF
12916#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12917_ACEOF
12918
12919
12920fi
12921
Michael W. Hudson54241132001-12-07 15:38:26 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12924$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012925if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927else
Matthias Kloseb159a552010-04-25 21:00:44 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012930/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012931#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012932int
12933main ()
12934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ;
12937 return 0;
12938}
12939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012940if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941 ac_cv_header_time_altzone=yes
12942else
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947fi
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12950$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954
12955fi
12956
Guido van Rossumda88dad1995-01-26 00:46:29 +000012957was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12959$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012962
12963#include <sys/types.h>
12964#include <sys/select.h>
12965#include <sys/time.h>
12966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967int
12968main ()
12969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970;
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ;
12972 return 0;
12973}
12974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
12977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012980 was_it_defined=yes
12981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12985$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12988$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012989if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012993/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012994#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012995int
12996main ()
12997{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012998struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004 ac_cv_struct_addrinfo=yes
13005else
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13009fi
13010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13012$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013013if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013016
13017fi
13018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13020$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013021if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013023else
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013025/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026
13027# include <sys/types.h>
13028# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013029int
13030main ()
13031{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013038 ac_cv_struct_sockaddr_storage=yes
13039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13043fi
13044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13046$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013047if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050
13051fi
13052
Christian Heimesdffa3942016-09-05 23:54:41 +020013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13054$as_echo_n "checking for sockaddr_alg... " >&6; }
13055if ${ac_cv_struct_sockaddr_alg+:} false; then :
13056 $as_echo_n "(cached) " >&6
13057else
13058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13059/* end confdefs.h. */
13060
13061# include <sys/types.h>
13062# include <sys/socket.h>
13063# include <linux/if_alg.h>
13064int
13065main ()
13066{
13067struct sockaddr_alg s
13068 ;
13069 return 0;
13070}
13071_ACEOF
13072if ac_fn_c_try_compile "$LINENO"; then :
13073 ac_cv_struct_sockaddr_alg=yes
13074else
13075 ac_cv_struct_sockaddr_alg=no
13076fi
13077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13078fi
13079
13080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13081$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13082if test $ac_cv_struct_sockaddr_alg = yes; then
13083
13084$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13085
13086fi
13087
Guido van Rossum627b2d71993-12-24 10:39:16 +000013088# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13091$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013092if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013094else
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013097$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013098int
13099main ()
13100{
13101static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013102test_array [0] = 0;
13103return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
13105 ;
13106 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013107}
Martin v. Löwis11437992002-04-12 09:54:03 +000013108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013110 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13117$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013120
13121fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13124$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013125if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013129/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130
Martin v. Löwis11437992002-04-12 09:54:03 +000013131int
13132main ()
13133{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013134
Martin v. Löwis11437992002-04-12 09:54:03 +000013135#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013136 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013138 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140 char const *const *pcpcc;
13141 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 /* NEC SVR4.0.2 mips cc rejects this. */
13143 struct point {int x, y;};
13144 static struct point const zero = {0,0};
13145 /* AIX XL C 1.02.0.0 rejects this.
13146 It does not let you subtract one const X* pointer from another in
13147 an arm of an if-expression whose if-part is not a constant
13148 expression */
13149 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152 ++pcpcc;
13153 ppc = (char**) pcpcc;
13154 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013155 { /* SCO 3.2v4 cc rejects this sort of thing. */
13156 char tx;
13157 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 }
13163 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13164 int x[] = {25, 17};
13165 const int *foo = &x[0];
13166 ++foo;
13167 }
13168 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13169 typedef const int *iptr;
13170 iptr p = 0;
13171 ++p;
13172 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013173 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013175 struct s { int j; const int *ap[3]; } bx;
13176 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 }
13178 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13179 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013183#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013184
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 ;
13186 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013187}
Martin v. Löwis11437992002-04-12 09:54:03 +000013188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013189if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190 ac_cv_c_const=yes
13191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13197$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201
13202fi
13203
Michael W. Hudson54241132001-12-07 15:38:26 +000013204
Guido van Rossumda88dad1995-01-26 00:46:29 +000013205works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13207$as_echo_n "checking for working volatile... " >&6; }
13208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013209/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013210
Martin v. Löwis11437992002-04-12 09:54:03 +000013211int
13212main ()
13213{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013214volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013220 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013221else
Skip Montanaro6dead952003-09-25 14:50:04 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013224
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013225
Guido van Rossum627b2d71993-12-24 10:39:16 +000013226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13229$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013230
Guido van Rossumda88dad1995-01-26 00:46:29 +000013231works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13233$as_echo_n "checking for working signed char... " >&6; }
13234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013235/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013240signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 ;
13242 return 0;
13243}
13244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013245if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013246 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013247else
Skip Montanaro6dead952003-09-25 14:50:04 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013250
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013251
Guido van Rossum7f43da71994-08-01 12:15:30 +000013252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13255$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013256
Guido van Rossumda88dad1995-01-26 00:46:29 +000013257have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13259$as_echo_n "checking for prototypes... " >&6; }
13260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013261/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013262int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013263int
13264main ()
13265{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013266return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 ;
13268 return 0;
13269}
13270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Matthias Kloseb159a552010-04-25 21:00:44 +000013275 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13279$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280
Guido van Rossumda88dad1995-01-26 00:46:29 +000013281works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13283$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013286
13287#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013288int foo(int x, ...) {
13289 va_list va;
13290 va_start(va, x);
13291 va_arg(va, int);
13292 va_arg(va, char *);
13293 va_arg(va, double);
13294 return 0;
13295}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013296
Martin v. Löwis11437992002-04-12 09:54:03 +000013297int
13298main ()
13299{
Guido van Rossum90eea071996-08-30 20:58:57 +000013300return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ;
13302 return 0;
13303}
13304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013310 works=yes
13311
Guido van Rossum627b2d71993-12-24 10:39:16 +000013312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13315$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316
Martin v. Löwisd6320502004-08-12 13:45:08 +000013317# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13319$as_echo_n "checking for socketpair... " >&6; }
13320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013321/* end confdefs.h. */
13322
13323#include <sys/types.h>
13324#include <sys/socket.h>
13325
13326int
13327main ()
13328{
13329void *x=socketpair
13330 ;
13331 return 0;
13332}
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013337
Matthias Kloseb159a552010-04-25 21:00:44 +000013338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13342$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013343
13344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013346
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013347# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13349$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013352#include <sys/types.h>
13353#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013354int
13355main ()
13356{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357struct sockaddr x;
13358x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ;
13360 return 0;
13361}
13362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if ac_fn_c_try_compile "$LINENO"; then :
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13365$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013368
13369else
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13371$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013372
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013375
Guido van Rossumda88dad1995-01-26 00:46:29 +000013376va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13378$as_echo_n "checking whether va_list is an array... " >&6; }
13379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013380/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381
13382#ifdef HAVE_STDARG_PROTOTYPES
13383#include <stdarg.h>
13384#else
13385#include <varargs.h>
13386#endif
13387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388int
13389main ()
13390{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 ;
13393 return 0;
13394}
13395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013396if ac_fn_c_try_compile "$LINENO"; then :
13397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398else
Skip Montanaro6dead952003-09-25 14:50:04 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Guido van Rossumda88dad1995-01-26 00:46:29 +000013403 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13408$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013410# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013414if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13419$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013420 OLD_CFLAGS=$CFLAGS
13421 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013423/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424
13425# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427int
13428main ()
13429{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013430
13431 char *name;
13432 struct hostent *he, *res;
13433 char buffer[2048];
13434 int buflen = 2048;
13435 int h_errnop;
13436
13437 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
13439 ;
13440 return 0;
13441}
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13451$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013453else
Skip Montanaro6dead952003-09-25 14:50:04 +000013454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13456$as_echo "no" >&6; }
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13458$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013461
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013462# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464int
13465main ()
13466{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467
13468 char *name;
13469 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013470 char buffer[2048];
13471 int buflen = 2048;
13472 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013473
Matthias Kloseb159a552010-04-25 21:00:44 +000013474 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
13476 ;
13477 return 0;
13478}
13479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013480if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Kloseb159a552010-04-25 21:00:44 +000013485$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13488$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013490else
Skip Montanaro6dead952003-09-25 14:50:04 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13493$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13495$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13497/* end confdefs.h. */
13498
13499# include <netdb.h>
13500
13501int
13502main ()
13503{
13504
13505 char *name;
13506 struct hostent *he;
13507 struct hostent_data data;
13508
13509 (void) gethostbyname_r(name, he, &data);
13510
13511 ;
13512 return 0;
13513}
13514_ACEOF
13515if ac_fn_c_try_compile "$LINENO"; then :
13516
13517 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13518
13519
13520$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13521
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13523$as_echo "yes" >&6; }
13524
13525else
13526
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13528$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013538 CFLAGS=$OLD_CFLAGS
13539
13540else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 for ac_func in gethostbyname
13543do :
13544 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013545if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013547#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013548_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013550fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013551done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013552
Michael W. Hudson54241132001-12-07 15:38:26 +000013553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013554fi
13555
Michael W. Hudson54241132001-12-07 15:38:26 +000013556
13557
13558
13559
13560
13561
Guido van Rossum627b2d71993-12-24 10:39:16 +000013562# checks for system services
13563# (none yet)
13564
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013566ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013567if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013568
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13571$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013572if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574else
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013576LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580/* Override any GCC internal prototype to avoid an error.
13581 Use char because int might match the return type of a GCC
13582 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013583#ifdef __cplusplus
13584extern "C"
13585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013586char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013587int
13588main ()
13589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ;
13592 return 0;
13593}
13594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013600rm -f core conftest.err conftest.$ac_objext \
13601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013602LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13605$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013606if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 cat >>confdefs.h <<_ACEOF
13608#define HAVE_LIBIEEE 1
13609_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013610
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013611 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612
Guido van Rossum627b2d71993-12-24 10:39:16 +000013613fi
13614
Michael W. Hudson54241132001-12-07 15:38:26 +000013615
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013616fi
13617
Michael W. Hudson54241132001-12-07 15:38:26 +000013618
Guido van Rossum7f253911997-05-09 02:42:48 +000013619# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13621$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013624if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013626if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013627then
13628
Matthias Kloseb9621712010-04-24 17:59:49 +000013629$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13632$as_echo "yes" >&6; }
13633else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13634$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013635fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13638$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639fi
13640
Guido van Rossum7f253911997-05-09 02:42:48 +000013641
Guido van Rossum7f43da71994-08-01 12:15:30 +000013642# check for --with-libm=...
13643
Guido van Rossum563e7081996-09-10 18:20:48 +000013644case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013645Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013646*) LIBM=-lm
13647esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13649$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013653 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013654if test "$withval" = no
13655then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13657$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013658elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013659then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13661$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013662else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013663fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13666$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013667fi
13668
Guido van Rossum7f43da71994-08-01 12:15:30 +000013669
13670# check for --with-libc=...
13671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13673$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013675# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013676if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013678if test "$withval" = no
13679then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13681$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013682elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013683then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13685$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013686else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013687fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013688else
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13690$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013691fi
13692
Guido van Rossum7f43da71994-08-01 12:15:30 +000013693
Stefan Krah1919b7e2012-03-21 18:25:23 +010013694# **************************************
13695# * Check for gcc x64 inline assembler *
13696# **************************************
13697
13698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13699$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13701/* end confdefs.h. */
13702
13703int
13704main ()
13705{
13706
13707 __asm__ __volatile__ ("movq %rcx, %rax");
13708
13709 ;
13710 return 0;
13711}
13712_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013713if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013714 have_gcc_asm_for_x64=yes
13715else
13716 have_gcc_asm_for_x64=no
13717fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013718rm -f core conftest.err conftest.$ac_objext \
13719 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13721$as_echo "$have_gcc_asm_for_x64" >&6; }
13722if test "$have_gcc_asm_for_x64" = yes
13723then
13724
13725$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13726
13727fi
13728
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013729# **************************************************
13730# * Check for various properties of floating point *
13731# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13734$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013735if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737else
13738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013740 ac_cv_little_endian_double=no
13741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743/* end confdefs.h. */
13744
13745#include <string.h>
13746int main() {
13747 double x = 9006104071832581.0;
13748 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13749 return 0;
13750 else
13751 return 1;
13752}
13753
13754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013756 ac_cv_little_endian_double=yes
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762fi
13763
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13767$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013768if test "$ac_cv_little_endian_double" = yes
13769then
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013772
13773fi
13774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13776$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013777if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779else
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013782 ac_cv_big_endian_double=no
13783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785/* end confdefs.h. */
13786
13787#include <string.h>
13788int main() {
13789 double x = 9006104071832581.0;
13790 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13791 return 0;
13792 else
13793 return 1;
13794}
13795
13796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013797if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013798 ac_cv_big_endian_double=yes
13799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804fi
13805
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806fi
13807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13809$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810if test "$ac_cv_big_endian_double" = yes
13811then
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814
13815fi
13816
13817# Some ARM platforms use a mixed-endian representation for doubles.
13818# While Python doesn't currently have full support for these platforms
13819# (see e.g., issue 1762561), we can at least make sure that float <-> string
13820# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13822$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013823if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825else
13826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013828 ac_cv_mixed_endian_double=no
13829else
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831/* end confdefs.h. */
13832
13833#include <string.h>
13834int main() {
13835 double x = 9006104071832581.0;
13836 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13837 return 0;
13838 else
13839 return 1;
13840}
13841
13842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844 ac_cv_mixed_endian_double=yes
13845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850fi
13851
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852fi
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13855$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856if test "$ac_cv_mixed_endian_double" = yes
13857then
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860
13861fi
13862
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013863# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013864# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013865# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013866# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013867# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013868# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013869
13870# This inline assembler syntax may also work for suncc and icc,
13871# so we try it on all platforms.
13872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13874$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876/* end confdefs.h. */
13877
13878int
13879main ()
13880{
13881
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013882 unsigned short cw;
13883 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13884 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885
13886 ;
13887 return 0;
13888}
13889_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013890if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013891 have_gcc_asm_for_x87=yes
13892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013895rm -f core conftest.err conftest.$ac_objext \
13896 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13898$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013899if test "$have_gcc_asm_for_x87" = yes
13900then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13907$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13909/* end confdefs.h. */
13910
13911int
13912main ()
13913{
13914
13915 unsigned int fpcr;
13916 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13917 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13918
13919 ;
13920 return 0;
13921}
13922_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013923if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013924 have_gcc_asm_for_mc68881=yes
13925else
13926 have_gcc_asm_for_mc68881=no
13927fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013928rm -f core conftest.err conftest.$ac_objext \
13929 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13931$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13932if test "$have_gcc_asm_for_mc68881" = yes
13933then
13934
13935$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13936
13937fi
13938
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013939# Detect whether system arithmetic is subject to x87-style double
13940# rounding issues. The result of this test has little meaning on non
13941# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13942# mode is round-to-nearest and double rounding issues are present, and
13943# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13945$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013946# $BASECFLAGS may affect the result
13947ac_save_cc="$CC"
13948CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013949if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013950 ac_cv_x87_double_rounding=no
13951else
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013953/* end confdefs.h. */
13954
13955#include <stdlib.h>
13956#include <math.h>
13957int main() {
13958 volatile double x, y, z;
13959 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13960 x = 0.99999999999999989; /* 1-2**-53 */
13961 y = 1./x;
13962 if (y != 1.)
13963 exit(0);
13964 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13965 x = 1e16;
13966 y = 2.99999;
13967 z = x + y;
13968 if (z != 1e16+4.)
13969 exit(0);
13970 /* both tests show evidence of double rounding */
13971 exit(1);
13972}
13973
13974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013975if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013976 ac_cv_x87_double_rounding=no
13977else
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013982fi
13983
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13986$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013987if test "$ac_cv_x87_double_rounding" = yes
13988then
13989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013991
13992fi
13993
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994# ************************************
13995# * Check for mathematical functions *
13996# ************************************
13997
13998LIBS_SAVE=$LIBS
13999LIBS="$LIBS $LIBM"
14000
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014001for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14002do :
14003 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14004ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014005if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014006 cat >>confdefs.h <<_ACEOF
14007#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14008_ACEOF
14009
14010fi
14011done
14012
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014013for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014014do :
14015 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14016ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014017if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014018 cat >>confdefs.h <<_ACEOF
14019#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14020_ACEOF
14021
14022fi
14023done
14024
14025ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14026"
Victor Stinnere0be4232011-10-25 13:06:09 +020014027if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014028 ac_have_decl=1
14029else
14030 ac_have_decl=0
14031fi
14032
14033cat >>confdefs.h <<_ACEOF
14034#define HAVE_DECL_ISINF $ac_have_decl
14035_ACEOF
14036ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14037"
Victor Stinnere0be4232011-10-25 13:06:09 +020014038if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014039 ac_have_decl=1
14040else
14041 ac_have_decl=0
14042fi
14043
14044cat >>confdefs.h <<_ACEOF
14045#define HAVE_DECL_ISNAN $ac_have_decl
14046_ACEOF
14047ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14048"
Victor Stinnere0be4232011-10-25 13:06:09 +020014049if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014050 ac_have_decl=1
14051else
14052 ac_have_decl=0
14053fi
14054
14055cat >>confdefs.h <<_ACEOF
14056#define HAVE_DECL_ISFINITE $ac_have_decl
14057_ACEOF
14058
14059
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014060# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14061# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14063$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014064if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014066else
14067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014069 ac_cv_tanh_preserves_zero_sign=no
14070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014072/* end confdefs.h. */
14073
14074#include <math.h>
14075#include <stdlib.h>
14076int main() {
14077 /* return 0 if either negative zeros don't exist
14078 on this platform or if negative zeros exist
14079 and tanh(-0.) == -0. */
14080 if (atan2(0., -1.) == atan2(-0., -1.) ||
14081 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14082 else exit(1);
14083}
14084
14085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014087 ac_cv_tanh_preserves_zero_sign=yes
14088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014093fi
14094
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014095fi
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14098$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014099if test "$ac_cv_tanh_preserves_zero_sign" = yes
14100then
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014103
14104fi
14105
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014106if test "$ac_cv_func_log1p" = yes
14107then
14108 # On some versions of AIX, log1p(-0.) returns 0. instead of
14109 # -0. See issue #9920.
14110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14111$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014112 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014113 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014114else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014115
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014116 if test "$cross_compiling" = yes; then :
14117 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014118else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014121
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014122 #include <math.h>
14123 #include <stdlib.h>
14124 int main() {
14125 /* Fail if the signs of log1p(-0.) and -0. can be
14126 distinguished. */
14127 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14128 return 0;
14129 else
14130 return 1;
14131 }
14132
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014133_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014134if ac_fn_c_try_run "$LINENO"; then :
14135 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014136else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014137 ac_cv_log1p_drops_zero_sign=yes
14138fi
14139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014141fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014142
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014143fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014144
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14146$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14147fi
14148if test "$ac_cv_log1p_drops_zero_sign" = yes
14149then
14150
14151$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14152
14153fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014154
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014155LIBS=$LIBS_SAVE
14156
Mark Dickinsona614f042009-11-28 12:48:43 +000014157# For multiprocessing module, check that sem_open
14158# actually works. For FreeBSD versions <= 7.2,
14159# the kernel module that provides POSIX semaphores
14160# isn't loaded by default, so an attempt to call
14161# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14163$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014164if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014168 ac_cv_posix_semaphores_enabled=yes
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014171/* end confdefs.h. */
14172
14173#include <unistd.h>
14174#include <fcntl.h>
14175#include <stdio.h>
14176#include <semaphore.h>
14177#include <sys/stat.h>
14178
14179int main(void) {
14180 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14181 if (a == SEM_FAILED) {
14182 perror("sem_open");
14183 return 1;
14184 }
14185 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014186 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014187 return 0;
14188}
14189
14190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014192 ac_cv_posix_semaphores_enabled=yes
14193else
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014198fi
14199
14200
Mark Dickinsona614f042009-11-28 12:48:43 +000014201fi
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14204$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014205if test $ac_cv_posix_semaphores_enabled = no
14206then
14207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014209
14210fi
14211
Mark Dickinson10683072009-04-18 21:18:19 +000014212# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14214$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014217else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014219 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014222/* end confdefs.h. */
14223
14224#include <unistd.h>
14225#include <fcntl.h>
14226#include <stdio.h>
14227#include <semaphore.h>
14228#include <sys/stat.h>
14229
14230int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014231 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014232 int count;
14233 int res;
14234 if(a==SEM_FAILED){
14235 perror("sem_open");
14236 return 1;
14237
14238 }
14239 res = sem_getvalue(a, &count);
14240 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014241 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014242 return res==-1 ? 1 : 0;
14243}
14244
Mark Dickinson10683072009-04-18 21:18:19 +000014245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014246if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014248else
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014253fi
14254
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014256fi
14257
Matthias Kloseb9621712010-04-24 17:59:49 +000014258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14259$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260if test $ac_cv_broken_sem_getvalue = yes
14261then
14262
Matthias Kloseb9621712010-04-24 17:59:49 +000014263$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264
14265fi
14266
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014267ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14268"
14269if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14270 ac_have_decl=1
14271else
14272 ac_have_decl=0
14273fi
14274
14275cat >>confdefs.h <<_ACEOF
14276#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14277_ACEOF
14278ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14279"
14280if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14281 ac_have_decl=1
14282else
14283 ac_have_decl=0
14284fi
14285
14286cat >>confdefs.h <<_ACEOF
14287#define HAVE_DECL_RTLD_NOW $ac_have_decl
14288_ACEOF
14289ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14290"
14291if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14292 ac_have_decl=1
14293else
14294 ac_have_decl=0
14295fi
14296
14297cat >>confdefs.h <<_ACEOF
14298#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14299_ACEOF
14300ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14301"
14302if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14303 ac_have_decl=1
14304else
14305 ac_have_decl=0
14306fi
14307
14308cat >>confdefs.h <<_ACEOF
14309#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14310_ACEOF
14311ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14312"
14313if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14314 ac_have_decl=1
14315else
14316 ac_have_decl=0
14317fi
14318
14319cat >>confdefs.h <<_ACEOF
14320#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14321_ACEOF
14322ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14323"
14324if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14325 ac_have_decl=1
14326else
14327 ac_have_decl=0
14328fi
14329
14330cat >>confdefs.h <<_ACEOF
14331#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14332_ACEOF
14333ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14334"
14335if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14336 ac_have_decl=1
14337else
14338 ac_have_decl=0
14339fi
14340
14341cat >>confdefs.h <<_ACEOF
14342#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14343_ACEOF
14344
14345
Mark Dickinsonbd792642009-03-18 20:06:12 +000014346# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14348$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014349# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014350if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014351 enableval=$enable_big_digits; case $enable_big_digits in
14352yes)
14353 enable_big_digits=30 ;;
14354no)
14355 enable_big_digits=15 ;;
1435615|30)
14357 ;;
14358*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014359 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 +000014360esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14362$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014363
14364cat >>confdefs.h <<_ACEOF
14365#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14366_ACEOF
14367
14368
14369else
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14371$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014372fi
14373
14374
Guido van Rossumef2255b2000-03-10 22:30:29 +000014375# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014376ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014377if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
14379
Matthias Kloseb9621712010-04-24 17:59:49 +000014380$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014382 wchar_h="yes"
14383
Guido van Rossumef2255b2000-03-10 22:30:29 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014386
14387fi
14388
Michael W. Hudson54241132001-12-07 15:38:26 +000014389
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014391# determine wchar_t size
14392if test "$wchar_h" = yes
14393then
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14397# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14399$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014400if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14404"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Martin v. Löwis11437992002-04-12 09:54:03 +000014406else
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 if test "$ac_cv_type_wchar_t" = yes; then
14408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014410as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014411See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014412 else
14413 ac_cv_sizeof_wchar_t=0
14414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14419$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420
14421
14422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014424#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014425_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014426
Michael W. Hudson54241132001-12-07 15:38:26 +000014427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014428fi
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14431$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014432have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014434/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014435
14436#include <tcl.h>
14437#if TCL_UTF_MAX != 6
14438# error "NOT UCS4_TCL"
14439#endif
14440int
14441main ()
14442{
14443
14444 ;
14445 return 0;
14446}
14447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014449
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014452
14453 have_ucs4_tcl=yes
14454
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14458$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014459
Skip Montanaro6dead952003-09-25 14:50:04 +000014460# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014461if test "$wchar_h" = yes
14462then
14463 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14465$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014466 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014468else
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014471 ac_cv_wchar_t_signed=yes
14472else
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014474/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014475
14476 #include <wchar.h>
14477 int main()
14478 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014479 /* Success: exit code 0 */
14480 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014481 }
14482
14483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014484if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014485 ac_cv_wchar_t_signed=yes
14486else
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014491fi
14492
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014493fi
14494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14496$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497fi
14498
Georg Brandl52d168a2008-01-07 18:10:24 +000014499# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014500if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014501 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014502then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014503 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014504
Matthias Kloseb9621712010-04-24 17:59:49 +000014505$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
Georg Brandl52d168a2008-01-07 18:10:24 +000014507else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014508 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014509fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14511$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014512
14513# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14515$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014516if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014518else
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 ac_cv_c_bigendian=unknown
14520 # See if we're dealing with a universal compiler.
14521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14522/* end confdefs.h. */
14523#ifndef __APPLE_CC__
14524 not a universal capable compiler
14525 #endif
14526 typedef int dummy;
14527
Skip Montanaro6dead952003-09-25 14:50:04 +000014528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014529if ac_fn_c_try_compile "$LINENO"; then :
14530
14531 # Check for potential -arch flags. It is not universal unless
14532 # there are at least two -arch flags with different values.
14533 ac_arch=
14534 ac_prev=
14535 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14536 if test -n "$ac_prev"; then
14537 case $ac_word in
14538 i?86 | x86_64 | ppc | ppc64)
14539 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14540 ac_arch=$ac_word
14541 else
14542 ac_cv_c_bigendian=universal
14543 break
14544 fi
14545 ;;
14546 esac
14547 ac_prev=
14548 elif test "x$ac_word" = "x-arch"; then
14549 ac_prev=arch
14550 fi
14551 done
14552fi
14553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14554 if test $ac_cv_c_bigendian = unknown; then
14555 # See if sys/param.h defines the BYTE_ORDER macro.
14556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014557/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014558#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014560
Martin v. Löwis11437992002-04-12 09:54:03 +000014561int
14562main ()
14563{
Matthias Kloseb9621712010-04-24 17:59:49 +000014564#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14565 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14566 && LITTLE_ENDIAN)
14567 bogus endian macros
14568 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014569
14570 ;
14571 return 0;
14572}
14573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014574if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014577/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014578#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014579 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580
Martin v. Löwis11437992002-04-12 09:54:03 +000014581int
14582main ()
14583{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 not big endian
14586 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
14588 ;
14589 return 0;
14590}
14591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014592if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593 ac_cv_c_bigendian=yes
14594else
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014598fi
14599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14600 fi
14601 if test $ac_cv_c_bigendian = unknown; then
14602 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014604/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014605#include <limits.h>
14606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607int
14608main ()
14609{
Matthias Kloseb9621712010-04-24 17:59:49 +000014610#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14611 bogus endian macros
14612 #endif
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 ;
14615 return 0;
14616}
14617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014618if ac_fn_c_try_compile "$LINENO"; then :
14619 # It does; now see whether it defined to _BIG_ENDIAN or not.
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621/* end confdefs.h. */
14622#include <limits.h>
14623
14624int
14625main ()
14626{
14627#ifndef _BIG_ENDIAN
14628 not big endian
14629 #endif
14630
14631 ;
14632 return 0;
14633}
14634_ACEOF
14635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014637else
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14641fi
14642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14643 fi
14644 if test $ac_cv_c_bigendian = unknown; then
14645 # Compile a test program.
14646 if test "$cross_compiling" = yes; then :
14647 # Try to guess by grepping values from an object file.
14648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14649/* end confdefs.h. */
14650short int ascii_mm[] =
14651 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14652 short int ascii_ii[] =
14653 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14654 int use_ascii (int i) {
14655 return ascii_mm[i] + ascii_ii[i];
14656 }
14657 short int ebcdic_ii[] =
14658 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14659 short int ebcdic_mm[] =
14660 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14661 int use_ebcdic (int i) {
14662 return ebcdic_mm[i] + ebcdic_ii[i];
14663 }
14664 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666int
14667main ()
14668{
14669return use_ascii (foo) == use_ebcdic (foo);
14670 ;
14671 return 0;
14672}
14673_ACEOF
14674if ac_fn_c_try_compile "$LINENO"; then :
14675 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14676 ac_cv_c_bigendian=yes
14677 fi
14678 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14679 if test "$ac_cv_c_bigendian" = unknown; then
14680 ac_cv_c_bigendian=no
14681 else
14682 # finding both strings is unlikely to happen, but who knows?
14683 ac_cv_c_bigendian=unknown
14684 fi
14685 fi
14686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014690/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014692int
14693main ()
14694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 /* Are we little or big endian? From Harbison&Steele. */
14697 union
14698 {
14699 long int l;
14700 char c[sizeof (long int)];
14701 } u;
14702 u.l = 1;
14703 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704
14705 ;
14706 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014707}
Martin v. Löwis11437992002-04-12 09:54:03 +000014708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014709if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014710 ac_cv_c_bigendian=no
14711else
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14721$as_echo "$ac_cv_c_bigendian" >&6; }
14722 case $ac_cv_c_bigendian in #(
14723 yes)
14724 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14725;; #(
14726 no)
14727 ;; #(
14728 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 ;; #(
14733 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014734 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014735 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014737
Michael W. Hudson54241132001-12-07 15:38:26 +000014738
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014739# ABI version string for Python extension modules. This appears between the
14740# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14741# from the following attributes which affect the ABI of this Python build (in
14742# this order):
14743#
14744# * The Python implementation (always 'cpython-' for us)
14745# * The major and minor version numbers
14746# * --with-pydebug (adds a 'd')
14747# * --with-pymalloc (adds a 'm')
14748# * --with-wide-unicode (adds a 'u')
14749#
14750# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014751# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14752# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014753
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14755$as_echo_n "checking ABIFLAGS... " >&6; }
14756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14757$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14759$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014760SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14762$as_echo "$SOABI" >&6; }
14763
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014764
14765case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014766 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014767 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14768 *)
14769 EXT_SUFFIX=${SHLIB_SUFFIX};;
14770esac
14771
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14773$as_echo_n "checking LDVERSION... " >&6; }
14774LDVERSION='$(VERSION)$(ABIFLAGS)'
14775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14776$as_echo "$LDVERSION" >&6; }
14777
doko@python.org87421192013-01-26 11:39:31 +010014778
doko@ubuntu.com55532312016-06-14 08:55:19 +020014779if test x$PLATFORM_TRIPLET = x; then
14780 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14781else
14782 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14783fi
doko@python.org87421192013-01-26 11:39:31 +010014784
14785
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014786# Check whether right shifting a negative integer extends the sign bit
14787# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14789$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014790if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014792else
Martin v. Löwis11437992002-04-12 09:54:03 +000014793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014795 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014796else
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014798/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014799
14800int main()
14801{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014802 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014803}
14804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014806if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014807 ac_cv_rshift_extends_sign=yes
14808else
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014813fi
14814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815fi
14816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14818$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014819if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014820then
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014823
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014824fi
14825
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014826# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14828$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014829if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014831else
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014834/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014835#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014836int
14837main ()
14838{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014839
14840 FILE *f = fopen("/dev/null", "r");
14841 flockfile(f);
14842 getc_unlocked(f);
14843 funlockfile(f);
14844
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 ;
14846 return 0;
14847}
14848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014849if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014850 ac_cv_have_getc_unlocked=yes
14851else
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 ac_cv_have_getc_unlocked=no
14853fi
14854rm -f core conftest.err conftest.$ac_objext \
14855 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14859$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014860if test "$ac_cv_have_getc_unlocked" = yes
14861then
Martin v. Löwis11437992002-04-12 09:54:03 +000014862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014864
14865fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014866
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014867# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014868# save the value of LIBS so we don't actually link Python with readline
14869LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014870
Gregory P. Smith18820942008-09-07 06:24:49 +000014871# On some systems we need to link readline to a termcap compatible
14872# library. NOTE: Keep the precedence of listed libraries synchronised
14873# with setup.py.
14874py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14876$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014877for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014878 if test -z "$py_libtermcap"; then
14879 READLINE_LIBS="-lreadline"
14880 else
14881 READLINE_LIBS="-lreadline -l$py_libtermcap"
14882 fi
14883 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014885/* end confdefs.h. */
14886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887/* Override any GCC internal prototype to avoid an error.
14888 Use char because int might match the return type of a GCC
14889 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014890#ifdef __cplusplus
14891extern "C"
14892#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014893char readline ();
14894int
14895main ()
14896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014898 ;
14899 return 0;
14900}
14901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014902if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014903 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014905rm -f core conftest.err conftest.$ac_objext \
14906 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014907 if test $py_cv_lib_readline = yes; then
14908 break
14909 fi
14910done
14911# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14912#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014913if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14915$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14918$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014921
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014922fi
14923
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14926$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014927if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014929else
14930 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014931LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014933/* end confdefs.h. */
14934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935/* Override any GCC internal prototype to avoid an error.
14936 Use char because int might match the return type of a GCC
14937 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014938#ifdef __cplusplus
14939extern "C"
14940#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941char rl_callback_handler_install ();
14942int
14943main ()
14944{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014946 ;
14947 return 0;
14948}
14949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014950if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014951 ac_cv_lib_readline_rl_callback_handler_install=yes
14952else
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014955rm -f core conftest.err conftest.$ac_objext \
14956 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014957LIBS=$ac_check_lib_save_LIBS
14958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14960$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014961if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014962
Matthias Kloseb9621712010-04-24 17:59:49 +000014963$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014964
14965fi
14966
14967
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971#include <readline/readline.h>
14972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014973if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014974 have_readline=yes
14975else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014976 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014977
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014978fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014979rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014980if test $have_readline = yes
14981then
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014983/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014984#include <readline/readline.h>
14985
14986_ACEOF
14987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991
14992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014993rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014996/* end confdefs.h. */
14997#include <readline/readline.h>
14998
14999_ACEOF
15000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015004
15005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015006rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015007
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015008fi
15009
Martin v. Löwis0daad592001-09-30 21:09:59 +000015010# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15012$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015013if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015017LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021/* Override any GCC internal prototype to avoid an error.
15022 Use char because int might match the return type of a GCC
15023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015024#ifdef __cplusplus
15025extern "C"
15026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015027char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015028int
15029main ()
15030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ;
15033 return 0;
15034}
15035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015041rm -f core conftest.err conftest.$ac_objext \
15042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015043LIBS=$ac_check_lib_save_LIBS
15044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15046$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015047if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015048
Matthias Kloseb9621712010-04-24 17:59:49 +000015049$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015050
Martin v. Löwis0daad592001-09-30 21:09:59 +000015051fi
15052
Michael W. Hudson54241132001-12-07 15:38:26 +000015053
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15056$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015057if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015059else
15060 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015061LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015063/* end confdefs.h. */
15064
15065/* Override any GCC internal prototype to avoid an error.
15066 Use char because int might match the return type of a GCC
15067 builtin and then its argument prototype would still apply. */
15068#ifdef __cplusplus
15069extern "C"
15070#endif
15071char rl_completion_display_matches_hook ();
15072int
15073main ()
15074{
15075return rl_completion_display_matches_hook ();
15076 ;
15077 return 0;
15078}
15079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015080if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015081 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15082else
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015085rm -f core conftest.err conftest.$ac_objext \
15086 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015087LIBS=$ac_check_lib_save_LIBS
15088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15090$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015091if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015094
15095fi
15096
15097
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015098# also in 4.0, but not in editline
15099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15100$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15101if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103else
15104 ac_check_lib_save_LIBS=$LIBS
15105LIBS="-lreadline $READLINE_LIBS $LIBS"
15106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107/* end confdefs.h. */
15108
15109/* Override any GCC internal prototype to avoid an error.
15110 Use char because int might match the return type of a GCC
15111 builtin and then its argument prototype would still apply. */
15112#ifdef __cplusplus
15113extern "C"
15114#endif
15115char rl_resize_terminal ();
15116int
15117main ()
15118{
15119return rl_resize_terminal ();
15120 ;
15121 return 0;
15122}
15123_ACEOF
15124if ac_fn_c_try_link "$LINENO"; then :
15125 ac_cv_lib_readline_rl_resize_terminal=yes
15126else
15127 ac_cv_lib_readline_rl_resize_terminal=no
15128fi
15129rm -f core conftest.err conftest.$ac_objext \
15130 conftest$ac_exeext conftest.$ac_ext
15131LIBS=$ac_check_lib_save_LIBS
15132fi
15133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15134$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15135if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15136
15137$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15138
15139fi
15140
15141
Martin v. Löwis0daad592001-09-30 21:09:59 +000015142# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15144$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015149LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153/* Override any GCC internal prototype to avoid an error.
15154 Use char because int might match the return type of a GCC
15155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015156#ifdef __cplusplus
15157extern "C"
15158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015159char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015160int
15161main ()
15162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173rm -f core conftest.err conftest.$ac_objext \
15174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015175LIBS=$ac_check_lib_save_LIBS
15176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15178$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015179if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015182
Guido van Rossum353ae582001-07-10 16:45:32 +000015183fi
15184
Jack Jansendd19cf82001-12-06 22:36:17 +000015185
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015186# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015188/* end confdefs.h. */
15189#include <readline/readline.h>
15190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015191if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015192 have_readline=yes
15193else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015194 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015195
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015197rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015198if test $have_readline = yes
15199then
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201/* end confdefs.h. */
15202#include <readline/readline.h>
15203
15204_ACEOF
15205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209
15210fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015211rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015212
15213fi
15214
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15216$as_echo_n "checking for append_history in -lreadline... " >&6; }
15217if ${ac_cv_lib_readline_append_history+:} false; then :
15218 $as_echo_n "(cached) " >&6
15219else
15220 ac_check_lib_save_LIBS=$LIBS
15221LIBS="-lreadline $READLINE_LIBS $LIBS"
15222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15223/* end confdefs.h. */
15224
15225/* Override any GCC internal prototype to avoid an error.
15226 Use char because int might match the return type of a GCC
15227 builtin and then its argument prototype would still apply. */
15228#ifdef __cplusplus
15229extern "C"
15230#endif
15231char append_history ();
15232int
15233main ()
15234{
15235return append_history ();
15236 ;
15237 return 0;
15238}
15239_ACEOF
15240if ac_fn_c_try_link "$LINENO"; then :
15241 ac_cv_lib_readline_append_history=yes
15242else
15243 ac_cv_lib_readline_append_history=no
15244fi
15245rm -f core conftest.err conftest.$ac_objext \
15246 conftest$ac_exeext conftest.$ac_ext
15247LIBS=$ac_check_lib_save_LIBS
15248fi
15249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15250$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15251if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15252
15253$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15254
15255fi
15256
15257
Martin v. Löwis82bca632006-02-10 20:49:30 +000015258# End of readline checks: restore LIBS
15259LIBS=$LIBS_no_readline
15260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15262$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015263if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015265else
Martin v. Löwis11437992002-04-12 09:54:03 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015268 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015272
15273int main()
15274{
15275 int val1 = nice(1);
15276 if (val1 != -1 && val1 == nice(2))
15277 exit(0);
15278 exit(1);
15279}
15280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015282if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015283 ac_cv_broken_nice=yes
15284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015289fi
15290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291fi
15292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15294$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015295if test "$ac_cv_broken_nice" = yes
15296then
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015299
15300fi
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15303$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015304if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015306else
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308 ac_cv_broken_poll=no
15309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311/* end confdefs.h. */
15312
15313#include <poll.h>
15314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315int main()
15316{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015317 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015319
15320 close (42);
15321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015322 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015323 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015324 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015326 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015327 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015328 return 1;
15329}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015330
15331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015332if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015333 ac_cv_broken_poll=yes
15334else
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15338 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341fi
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15344$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015345if test "$ac_cv_broken_poll" = yes
15346then
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015349
15350fi
15351
Brett Cannon43802422005-02-10 20:48:03 +000015352# 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 +000015353# (which is not required by ISO C or UNIX spec) and/or if we support
15354# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015355ac_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 +000015356#include <$ac_cv_struct_tm>
15357
Matthias Kloseb9621712010-04-24 17:59:49 +000015358"
Victor Stinnere0be4232011-10-25 13:06:09 +020015359if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015360
15361cat >>confdefs.h <<_ACEOF
15362#define HAVE_STRUCT_TM_TM_ZONE 1
15363_ACEOF
15364
15365
15366fi
15367
15368if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015371
15372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15374"
Victor Stinnere0be4232011-10-25 13:06:09 +020015375if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377else
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379fi
15380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015382#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383_ACEOF
15384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15386$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015387if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015391/* end confdefs.h. */
15392#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393#if !HAVE_DECL_TZNAME
15394extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015395#endif
15396
15397int
15398main ()
15399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015401 ;
15402 return 0;
15403}
15404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015405if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015406 ac_cv_var_tzname=yes
15407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015410rm -f core conftest.err conftest.$ac_objext \
15411 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15414$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015415 if test $ac_cv_var_tzname = yes; then
15416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015418
15419 fi
15420fi
15421
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015422
Martin v. Löwis1d459062005-03-14 21:23:33 +000015423# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15425$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015426if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015428else
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015431 ac_cv_working_tzset=no
15432else
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015434/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015435
15436#include <stdlib.h>
15437#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015438#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015439
15440#if HAVE_TZNAME
15441extern char *tzname[];
15442#endif
15443
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015444int main()
15445{
Brett Cannon18367812003-09-19 00:59:16 +000015446 /* Note that we need to ensure that not only does tzset(3)
15447 do 'something' with localtime, but it works as documented
15448 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015449 This includes making sure that tzname is set properly if
15450 tm->tm_zone does not exist since it is the alternative way
15451 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015452
15453 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015454 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015455 */
15456
Martin v. Löwis1d459062005-03-14 21:23:33 +000015457 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015458 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15459
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015460 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015461 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015462 if (localtime(&groundhogday)->tm_hour != 0)
15463 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015464#if HAVE_TZNAME
15465 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15466 if (strcmp(tzname[0], "UTC") ||
15467 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15468 exit(1);
15469#endif
Brett Cannon18367812003-09-19 00:59:16 +000015470
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015471 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015472 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015473 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015474 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015475#if HAVE_TZNAME
15476 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15477 exit(1);
15478#endif
Brett Cannon18367812003-09-19 00:59:16 +000015479
15480 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15481 tzset();
15482 if (localtime(&groundhogday)->tm_hour != 11)
15483 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015484#if HAVE_TZNAME
15485 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15486 exit(1);
15487#endif
15488
15489#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015490 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15491 exit(1);
15492 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15493 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015494#endif
Brett Cannon18367812003-09-19 00:59:16 +000015495
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496 exit(0);
15497}
15498
15499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015500if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015501 ac_cv_working_tzset=yes
15502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015507fi
15508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509fi
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15512$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015513if test "$ac_cv_working_tzset" = yes
15514then
15515
Matthias Kloseb9621712010-04-24 17:59:49 +000015516$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015517
15518fi
15519
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15522$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015523if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015525else
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015528#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529int
15530main ()
15531{
15532
15533struct stat st;
15534st.st_mtim.tv_nsec = 1;
15535
15536 ;
15537 return 0;
15538}
15539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015541 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15546fi
15547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15549$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015550if test "$ac_cv_stat_tv_nsec" = yes
15551then
15552
Matthias Kloseb9621712010-04-24 17:59:49 +000015553$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015554
15555fi
15556
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015557# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15559$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015560if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015561 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015562else
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015564/* end confdefs.h. */
15565#include <sys/stat.h>
15566int
15567main ()
15568{
15569
15570struct stat st;
15571st.st_mtimespec.tv_nsec = 1;
15572
15573 ;
15574 return 0;
15575}
15576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015578 ac_cv_stat_tv_nsec2=yes
15579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15583fi
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15586$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015587if test "$ac_cv_stat_tv_nsec2" = yes
15588then
15589
Matthias Kloseb9621712010-04-24 17:59:49 +000015590$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015591
15592fi
15593
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015594# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015595ac_save_cppflags="$CPPFLAGS"
15596CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015597
15598for ac_header in curses.h ncurses.h
15599do :
15600 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15601ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15602if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15603 cat >>confdefs.h <<_ACEOF
15604#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15605_ACEOF
15606
15607fi
15608
15609done
15610
15611
15612# On Solaris, term.h requires curses.h
15613for ac_header in term.h
15614do :
15615 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15616#ifdef HAVE_CURSES_H
15617#include <curses.h>
15618#endif
15619
15620"
15621if test "x$ac_cv_header_term_h" = xyes; then :
15622 cat >>confdefs.h <<_ACEOF
15623#define HAVE_TERM_H 1
15624_ACEOF
15625
15626fi
15627
15628done
15629
15630
Jack Jansen666b1e72001-10-31 12:11:48 +000015631# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15633$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015634if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015636else
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015638/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015639#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015640int
15641main ()
15642{
Jack Jansen666b1e72001-10-31 12:11:48 +000015643
15644 int rtn;
15645 rtn = mvwdelch(0,0,0);
15646
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 ;
15648 return 0;
15649}
15650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015651if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015652 ac_cv_mvwdelch_is_expression=yes
15653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15657fi
15658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15660$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015661
15662if test "$ac_cv_mvwdelch_is_expression" = yes
15663then
Martin v. Löwis11437992002-04-12 09:54:03 +000015664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015666
15667fi
15668
Matthias Kloseb9621712010-04-24 17:59:49 +000015669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15670$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015671if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015672 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015673else
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015675/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015676#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015677int
15678main ()
15679{
Jack Jansen666b1e72001-10-31 12:11:48 +000015680
15681 WINDOW *w;
15682 w->_flags = 0;
15683
Martin v. Löwis11437992002-04-12 09:54:03 +000015684 ;
15685 return 0;
15686}
15687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015688if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015689 ac_cv_window_has_flags=yes
15690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15694fi
15695
Matthias Kloseb9621712010-04-24 17:59:49 +000015696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15697$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015698
Jack Jansen666b1e72001-10-31 12:11:48 +000015699
15700if test "$ac_cv_window_has_flags" = yes
15701then
Martin v. Löwis11437992002-04-12 09:54:03 +000015702
Matthias Kloseb9621712010-04-24 17:59:49 +000015703$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015704
15705fi
15706
Matthias Kloseb9621712010-04-24 17:59:49 +000015707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15708$as_echo_n "checking for is_term_resized... " >&6; }
15709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015710/* end confdefs.h. */
15711#include <curses.h>
15712int
15713main ()
15714{
15715void *x=is_term_resized
15716 ;
15717 return 0;
15718}
15719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015720if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015723
Matthias Kloseb159a552010-04-25 21:00:44 +000015724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015725$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015726else
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15728$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015729
15730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15732
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15734$as_echo_n "checking for resize_term... " >&6; }
15735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015736/* end confdefs.h. */
15737#include <curses.h>
15738int
15739main ()
15740{
15741void *x=resize_term
15742 ;
15743 return 0;
15744}
15745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015746if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015749
Matthias Kloseb159a552010-04-25 21:00:44 +000015750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015751$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015752else
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15754$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015755
15756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15760$as_echo_n "checking for resizeterm... " >&6; }
15761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015762/* end confdefs.h. */
15763#include <curses.h>
15764int
15765main ()
15766{
15767void *x=resizeterm
15768 ;
15769 return 0;
15770}
15771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015772if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015775
Matthias Kloseb159a552010-04-25 21:00:44 +000015776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015777$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015778else
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15780$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015781
15782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015784# last curses configure check
15785CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15788$as_echo "$as_me: checking for device files" >&6;}
15789
15790if test "x$cross_compiling" = xyes; then
15791 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15793$as_echo_n "checking for /dev/ptmx... " >&6; }
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15795$as_echo "not set" >&6; }
15796 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15797 fi
15798 if test "${ac_cv_file__dev_ptc+set}" != set; then
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15800$as_echo_n "checking for /dev/ptc... " >&6; }
15801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15802$as_echo "not set" >&6; }
15803 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15804 fi
15805fi
15806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15808$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015809if ${ac_cv_file__dev_ptmx+:} false; then :
15810 $as_echo_n "(cached) " >&6
15811else
15812 test "$cross_compiling" = yes &&
15813 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15814if test -r "/dev/ptmx"; then
15815 ac_cv_file__dev_ptmx=yes
15816else
15817 ac_cv_file__dev_ptmx=no
15818fi
15819fi
15820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15821$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15822if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015823
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015824fi
15825
15826if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015829
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15832$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015833if ${ac_cv_file__dev_ptc+:} false; then :
15834 $as_echo_n "(cached) " >&6
15835else
15836 test "$cross_compiling" = yes &&
15837 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15838if test -r "/dev/ptc"; then
15839 ac_cv_file__dev_ptc=yes
15840else
15841 ac_cv_file__dev_ptc=no
15842fi
15843fi
15844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15845$as_echo "$ac_cv_file__dev_ptc" >&6; }
15846if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015847
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015848fi
15849
15850if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015851
Matthias Kloseb9621712010-04-24 17:59:49 +000015852$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015853
Neal Norwitz865400f2003-03-21 01:42:58 +000015854fi
15855
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015856if test "$have_long_long" = yes
15857then
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15859$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015860 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015864 ac_cv_have_long_long_format="cross -- assuming no"
15865 if test x$GCC = xyes; then
15866 save_CFLAGS=$CFLAGS
15867 CFLAGS="$CFLAGS -Werror -Wformat"
15868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15869/* end confdefs.h. */
15870
15871 #include <stdio.h>
15872 #include <stddef.h>
15873
15874int
15875main ()
15876{
15877
15878 char *buffer;
15879 sprintf(buffer, "%lld", (long long)123);
15880 sprintf(buffer, "%lld", (long long)-123);
15881 sprintf(buffer, "%llu", (unsigned long long)123);
15882
15883 ;
15884 return 0;
15885}
15886_ACEOF
15887if ac_fn_c_try_compile "$LINENO"; then :
15888 ac_cv_have_long_long_format=yes
15889
15890fi
15891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15892 CFLAGS=$save_CFLAGS
15893 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015894else
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015896/* end confdefs.h. */
15897
15898 #include <stdio.h>
15899 #include <stddef.h>
15900 #include <string.h>
15901
15902 #ifdef HAVE_SYS_TYPES_H
15903 #include <sys/types.h>
15904 #endif
15905
15906 int main()
15907 {
15908 char buffer[256];
15909
15910 if (sprintf(buffer, "%lld", (long long)123) < 0)
15911 return 1;
15912 if (strcmp(buffer, "123"))
15913 return 1;
15914
15915 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15916 return 1;
15917 if (strcmp(buffer, "-123"))
15918 return 1;
15919
15920 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15921 return 1;
15922 if (strcmp(buffer, "123"))
15923 return 1;
15924
15925 return 0;
15926 }
15927
15928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015929if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015930 ac_cv_have_long_long_format=yes
15931else
Matthias Kloseb9621712010-04-24 17:59:49 +000015932 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15935 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015936fi
15937
15938
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015939fi
15940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15942$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015943fi
15944
Mark Dickinson89d7d412009-12-31 20:50:59 +000015945if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015946then
15947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015949
15950fi
15951
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015952if test $ac_sys_system = Darwin
15953then
15954 LIBS="$LIBS -framework CoreFoundation"
15955fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015956
Matthias Kloseb9621712010-04-24 17:59:49 +000015957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15958$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015959if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015960 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015961else
Matthias Kloseb9621712010-04-24 17:59:49 +000015962 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015963 ac_cv_have_size_t_format="cross -- assuming yes"
15964
Thomas Wouters477c8d52006-05-27 19:21:47 +000015965else
Matthias Kloseb9621712010-04-24 17:59:49 +000015966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015967/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015968
Thomas Wouters477c8d52006-05-27 19:21:47 +000015969#include <stdio.h>
15970#include <stddef.h>
15971#include <string.h>
15972
Christian Heimes2c181612007-12-17 20:04:13 +000015973#ifdef HAVE_SYS_TYPES_H
15974#include <sys/types.h>
15975#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015976
15977#ifdef HAVE_SSIZE_T
15978typedef ssize_t Py_ssize_t;
15979#elif SIZEOF_VOID_P == SIZEOF_LONG
15980typedef long Py_ssize_t;
15981#else
15982typedef int Py_ssize_t;
15983#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015984
Christian Heimes2c181612007-12-17 20:04:13 +000015985int main()
15986{
15987 char buffer[256];
15988
Thomas Wouters477c8d52006-05-27 19:21:47 +000015989 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15990 return 1;
15991
Thomas Wouters89f507f2006-12-13 04:49:30 +000015992 if (strcmp(buffer, "123"))
15993 return 1;
15994
15995 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15996 return 1;
15997
15998 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015999 return 1;
16000
16001 return 0;
16002}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016003
Thomas Wouters477c8d52006-05-27 19:21:47 +000016004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016005if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016006 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016007else
Matthias Kloseb9621712010-04-24 17:59:49 +000016008 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016012fi
16013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16016$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016017if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016018
Matthias Kloseb9621712010-04-24 17:59:49 +000016019$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016020
16021fi
16022
Matthias Kloseb9621712010-04-24 17:59:49 +000016023ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016024#ifdef HAVE_SYS_TYPES_H
16025#include <sys/types.h>
16026#endif
16027#ifdef HAVE_SYS_SOCKET_H
16028#include <sys/socket.h>
16029#endif
16030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031"
Victor Stinnere0be4232011-10-25 13:06:09 +020016032if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016033
Martin v. Löwis11437992002-04-12 09:54:03 +000016034else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016037
16038fi
16039
Michael W. Hudson54241132001-12-07 15:38:26 +000016040
Matthias Kloseb9621712010-04-24 17:59:49 +000016041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16042$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016043if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016044 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016045else
Matthias Kloseb9621712010-04-24 17:59:49 +000016046 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016047 ac_cv_broken_mbstowcs=no
16048else
Matthias Kloseb9621712010-04-24 17:59:49 +000016049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016050/* end confdefs.h. */
16051
Stefan Krah19c21392012-11-22 23:47:32 +010016052#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016053#include<stdlib.h>
16054int main() {
16055 size_t len = -1;
16056 const char *str = "text";
16057 len = mbstowcs(NULL, str, 0);
16058 return (len != 4);
16059}
16060
16061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016062if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016063 ac_cv_broken_mbstowcs=no
16064else
Matthias Kloseb9621712010-04-24 17:59:49 +000016065 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016069fi
16070
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016071fi
16072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16074$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016075if test "$ac_cv_broken_mbstowcs" = yes
16076then
16077
Matthias Kloseb9621712010-04-24 17:59:49 +000016078$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016079
16080fi
16081
Antoine Pitroub52ec782009-01-25 16:34:23 +000016082# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16084$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016085
16086# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016087if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016088 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016089if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016090then
16091
Matthias Kloseb9621712010-04-24 17:59:49 +000016092$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16095$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016096fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016097if test "$withval" = no
16098then
16099
16100$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16101
Matthias Kloseb9621712010-04-24 17:59:49 +000016102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16103$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016104fi
16105
Antoine Pitrou042b1282010-08-13 21:15:58 +000016106else
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16108$as_echo "no value specified" >&6; }
16109fi
16110
Antoine Pitroub52ec782009-01-25 16:34:23 +000016111
Matthias Kloseb17289e2012-03-15 19:51:34 +010016112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16113$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16114if ${ac_cv_computed_gotos+:} false; then :
16115 $as_echo_n "(cached) " >&6
16116else
16117 if test "$cross_compiling" = yes; then :
16118 if test "${with_computed_gotos+set}" = set; then
16119 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16120 else
16121 ac_cv_computed_gotos=no
16122 fi
16123else
16124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125/* end confdefs.h. */
16126
16127int main(int argc, char **argv)
16128{
16129 static void *targets[1] = { &&LABEL1 };
16130 goto LABEL2;
16131LABEL1:
16132 return 0;
16133LABEL2:
16134 goto *targets[0];
16135 return 1;
16136}
16137
16138_ACEOF
16139if ac_fn_c_try_run "$LINENO"; then :
16140 ac_cv_computed_gotos=yes
16141else
16142 ac_cv_computed_gotos=no
16143fi
16144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16145 conftest.$ac_objext conftest.beam conftest.$ac_ext
16146fi
16147
16148fi
16149
16150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16151$as_echo "$ac_cv_computed_gotos" >&6; }
16152case "$ac_cv_computed_gotos" in yes*)
16153
16154$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16155
16156esac
16157
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016158case $ac_sys_system in
16159AIX*)
16160
16161$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16162 ;;
16163esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016164
Michael W. Hudson54241132001-12-07 15:38:26 +000016165
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016166
16167
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016168for h in `(cd $srcdir;echo Python/thread_*.h)`
16169do
16170 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16171done
16172
Michael W. Hudson54241132001-12-07 15:38:26 +000016173
Ned Deily0db50cf2014-07-25 12:41:31 -070016174SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16176$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016177for dir in $SRCDIRS; do
16178 if test ! -d $dir; then
16179 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016180 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016181done
Matthias Kloseb9621712010-04-24 17:59:49 +000016182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16183$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016184
Stefan Krah1919b7e2012-03-21 18:25:23 +010016185# Availability of -O2:
16186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16187$as_echo_n "checking for -O2... " >&6; }
16188saved_cflags="$CFLAGS"
16189CFLAGS="-O2"
16190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16191/* end confdefs.h. */
16192
16193int
16194main ()
16195{
16196
16197
16198 ;
16199 return 0;
16200}
16201_ACEOF
16202if ac_fn_c_try_compile "$LINENO"; then :
16203 have_O2=yes
16204else
16205 have_O2=no
16206fi
16207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16209$as_echo "$have_O2" >&6; }
16210CFLAGS="$saved_cflags"
16211
16212# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16213# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16215$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16216saved_cflags="$CFLAGS"
16217CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16218if test "$have_O2" = no; then
16219 CFLAGS=""
16220fi
16221if test "$cross_compiling" = yes; then :
16222 have_glibc_memmove_bug=undefined
16223else
16224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16225/* end confdefs.h. */
16226
16227#include <stdio.h>
16228#include <stdlib.h>
16229#include <string.h>
16230void foo(void *p, void *q) { memmove(p, q, 19); }
16231int main() {
16232 char a[32] = "123456789000000000";
16233 foo(&a[9], a);
16234 if (strcmp(a, "123456789123456789000000000") != 0)
16235 return 1;
16236 foo(a, &a[9]);
16237 if (strcmp(a, "123456789000000000") != 0)
16238 return 1;
16239 return 0;
16240}
16241
16242_ACEOF
16243if ac_fn_c_try_run "$LINENO"; then :
16244 have_glibc_memmove_bug=no
16245else
16246 have_glibc_memmove_bug=yes
16247fi
16248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16249 conftest.$ac_objext conftest.beam conftest.$ac_ext
16250fi
16251
16252CFLAGS="$saved_cflags"
16253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16254$as_echo "$have_glibc_memmove_bug" >&6; }
16255if test "$have_glibc_memmove_bug" = yes; then
16256
16257$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16258
16259fi
16260
16261if test "$have_gcc_asm_for_x87" = yes; then
16262 # Some versions of gcc miscompile inline asm:
16263 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16264 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16265 case $CC in
16266 *gcc*)
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16268$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16269 saved_cflags="$CFLAGS"
16270 CFLAGS="-O2"
16271 if test "$cross_compiling" = yes; then :
16272 have_ipa_pure_const_bug=undefined
16273else
16274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16275/* end confdefs.h. */
16276
16277 __attribute__((noinline)) int
16278 foo(int *p) {
16279 int r;
16280 asm ( "movl \$6, (%1)\n\t"
16281 "xorl %0, %0\n\t"
16282 : "=r" (r) : "r" (p) : "memory"
16283 );
16284 return r;
16285 }
16286 int main() {
16287 int p = 8;
16288 if ((foo(&p) ? : p) != 6)
16289 return 1;
16290 return 0;
16291 }
16292
16293_ACEOF
16294if ac_fn_c_try_run "$LINENO"; then :
16295 have_ipa_pure_const_bug=no
16296else
16297 have_ipa_pure_const_bug=yes
16298fi
16299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16300 conftest.$ac_objext conftest.beam conftest.$ac_ext
16301fi
16302
16303 CFLAGS="$saved_cflags"
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16305$as_echo "$have_ipa_pure_const_bug" >&6; }
16306 if test "$have_ipa_pure_const_bug" = yes; then
16307
16308$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16309
16310 fi
16311 ;;
16312 esac
16313fi
16314
Victor Stinner4f5366e2015-01-09 02:13:19 +010016315# Check for stdatomic.h
16316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16317$as_echo_n "checking for stdatomic.h... " >&6; }
16318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16319/* end confdefs.h. */
16320
16321
16322 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016323 atomic_int value = ATOMIC_VAR_INIT(1);
16324 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016325 int main() {
16326 int loaded_value = atomic_load(&value);
16327 return 0;
16328 }
16329
16330
16331_ACEOF
16332if ac_fn_c_try_link "$LINENO"; then :
16333 have_stdatomic_h=yes
16334else
16335 have_stdatomic_h=no
16336fi
16337rm -f core conftest.err conftest.$ac_objext \
16338 conftest$ac_exeext conftest.$ac_ext
16339
16340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16341$as_echo "$have_stdatomic_h" >&6; }
16342
16343if test "$have_stdatomic_h" = yes; then
16344
16345$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16346
16347fi
16348
16349# Check for GCC >= 4.7 __atomic builtins
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16351$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16353/* end confdefs.h. */
16354
16355
16356 volatile int val = 1;
16357 int main() {
16358 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16359 return 0;
16360 }
16361
16362
16363_ACEOF
16364if ac_fn_c_try_link "$LINENO"; then :
16365 have_builtin_atomic=yes
16366else
16367 have_builtin_atomic=no
16368fi
16369rm -f core conftest.err conftest.$ac_objext \
16370 conftest$ac_exeext conftest.$ac_ext
16371
16372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16373$as_echo "$have_builtin_atomic" >&6; }
16374
16375if test "$have_builtin_atomic" = yes; then
16376
16377$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16378
16379fi
16380
Ned Deily322f5ba2013-11-21 23:01:59 -080016381# ensurepip option
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16383$as_echo_n "checking for ensurepip... " >&6; }
16384
16385# Check whether --with-ensurepip was given.
16386if test "${with_ensurepip+set}" = set; then :
16387 withval=$with_ensurepip;
16388else
16389 with_ensurepip=upgrade
16390fi
16391
16392case $with_ensurepip in #(
16393 yes|upgrade) :
16394 ENSUREPIP=upgrade ;; #(
16395 install) :
16396 ENSUREPIP=install ;; #(
16397 no) :
16398 ENSUREPIP=no ;; #(
16399 *) :
16400 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16401esac
16402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16403$as_echo "$ENSUREPIP" >&6; }
16404
16405
Victor Stinner35a97c02015-03-08 02:59:09 +010016406# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16408$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16410/* end confdefs.h. */
16411
16412
16413 #include <dirent.h>
16414
16415 int main() {
16416 struct dirent entry;
16417 return entry.d_type == DT_UNKNOWN;
16418 }
16419
16420
16421_ACEOF
16422if ac_fn_c_try_link "$LINENO"; then :
16423 have_dirent_d_type=yes
16424else
16425 have_dirent_d_type=no
16426fi
16427rm -f core conftest.err conftest.$ac_objext \
16428 conftest$ac_exeext conftest.$ac_ext
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16430$as_echo "$have_dirent_d_type" >&6; }
16431
16432if test "$have_dirent_d_type" = yes; then
16433
16434$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16435
16436fi
16437
Victor Stinner9eb57c52015-03-19 22:21:49 +010016438# check if the Linux getrandom() syscall is available
16439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16440$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442/* end confdefs.h. */
16443
16444
Victor Stinner1b80b242016-04-12 22:34:58 +020016445 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016446 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016447 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016448
16449 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016450 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016451 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016452 const int flags = GRND_NONBLOCK;
16453 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016454 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016455 return 0;
16456 }
16457
16458
16459_ACEOF
16460if ac_fn_c_try_link "$LINENO"; then :
16461 have_getrandom_syscall=yes
16462else
16463 have_getrandom_syscall=no
16464fi
16465rm -f core conftest.err conftest.$ac_objext \
16466 conftest$ac_exeext conftest.$ac_ext
16467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16468$as_echo "$have_getrandom_syscall" >&6; }
16469
16470if test "$have_getrandom_syscall" = yes; then
16471
16472$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16473
16474fi
16475
Victor Stinner3abf44e2015-09-18 15:38:37 +020016476# check if the getrandom() function is available
16477# the test was written for the Solaris function of <sys/random.h>
16478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16479$as_echo_n "checking for the getrandom() function... " >&6; }
16480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16481/* end confdefs.h. */
16482
16483
16484 #include <sys/random.h>
16485
16486 int main() {
16487 char buffer[1];
16488 const size_t buflen = sizeof(buffer);
16489 const int flags = 0;
16490 /* ignore the result, Python checks for ENOSYS at runtime */
16491 (void)getrandom(buffer, buflen, flags);
16492 return 0;
16493 }
16494
16495
16496_ACEOF
16497if ac_fn_c_try_link "$LINENO"; then :
16498 have_getrandom=yes
16499else
16500 have_getrandom=no
16501fi
16502rm -f core conftest.err conftest.$ac_objext \
16503 conftest$ac_exeext conftest.$ac_ext
16504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16505$as_echo "$have_getrandom" >&6; }
16506
16507if test "$have_getrandom" = yes; then
16508
16509$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16510
16511fi
16512
Guido van Rossum627b2d71993-12-24 10:39:16 +000016513# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016514ac_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 +000016515
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016516ac_config_files="$ac_config_files Modules/ld_so_aix"
16517
Martin v. Löwis11437992002-04-12 09:54:03 +000016518cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519# This file is a shell script that caches the results of configure
16520# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016521# scripts and configure runs, see configure's option --config-cache.
16522# It is not useful on other systems. If it contains results you don't
16523# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016524#
Martin v. Löwis11437992002-04-12 09:54:03 +000016525# config.status only pays attention to the cache file if you give it
16526# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016527#
Skip Montanaro6dead952003-09-25 14:50:04 +000016528# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016529# loading this file, other *unset* `ac_cv_foo' will be assigned the
16530# following values.
16531
16532_ACEOF
16533
Guido van Rossumf78abae1997-01-21 22:02:36 +000016534# The following way of writing the cache mishandles newlines in values,
16535# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016537# Ultrix sh set writes to stderr and can't be redirected directly,
16538# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539(
16540 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16541 eval ac_val=\$$ac_var
16542 case $ac_val in #(
16543 *${as_nl}*)
16544 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16546$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547 esac
16548 case $ac_var in #(
16549 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016550 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16551 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 esac ;;
16553 esac
16554 done
16555
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16558 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016559 # `set' does not quote correctly, so add quotes: double-quote
16560 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562 "s/'/'\\\\''/g;
16563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 *)
16566 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569 esac |
16570 sort
16571) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016575 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16577 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16579 :end' >>confcache
16580if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16581 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016582 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016583 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16584$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016585 if test ! -f "$cache_file" || test -h "$cache_file"; then
16586 cat confcache >"$cache_file"
16587 else
16588 case $cache_file in #(
16589 */* | ?:*)
16590 mv -f confcache "$cache_file"$$ &&
16591 mv -f "$cache_file"$$ "$cache_file" ;; #(
16592 *)
16593 mv -f confcache "$cache_file" ;;
16594 esac
16595 fi
16596 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016597 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016598 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16599$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016600 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016601fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016602rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016604test "x$prefix" = xNONE && prefix=$ac_default_prefix
16605# Let make expand exec_prefix.
16606test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016607
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016608DEFS=-DHAVE_CONFIG_H
16609
Skip Montanaro6dead952003-09-25 14:50:04 +000016610ac_libobjs=
16611ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016612U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016613for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16614 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016616 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16618 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016619 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16620 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016621done
16622LIBOBJS=$ac_libobjs
16623
16624LTLIBOBJS=$ac_ltlibobjs
16625
16626
Martin v. Löwis11437992002-04-12 09:54:03 +000016627
Matthias Kloseb9621712010-04-24 17:59:49 +000016628
Victor Stinnere0be4232011-10-25 13:06:09 +020016629: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016630ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016631ac_clean_files_save=$ac_clean_files
16632ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016633{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16634$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16635as_write_fail=0
16636cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016637#! $SHELL
16638# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016639# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016640# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016641# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016642
Martin v. Löwis11437992002-04-12 09:54:03 +000016643debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016644ac_cs_recheck=false
16645ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016646
Matthias Kloseb9621712010-04-24 17:59:49 +000016647SHELL=\${CONFIG_SHELL-$SHELL}
16648export SHELL
16649_ASEOF
16650cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16651## -------------------- ##
16652## M4sh Initialization. ##
16653## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655# Be more Bourne compatible
16656DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016657if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 emulate sh
16659 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016660 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016661 # is contrary to our usage. Disable this feature.
16662 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016664else
Matthias Kloseb9621712010-04-24 17:59:49 +000016665 case `(set -o) 2>/dev/null` in #(
16666 *posix*) :
16667 set -o posix ;; #(
16668 *) :
16669 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016671fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016672
16673
Matthias Kloseb9621712010-04-24 17:59:49 +000016674as_nl='
16675'
16676export as_nl
16677# Printing a long string crashes Solaris 7 /usr/bin/printf.
16678as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16679as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16680as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16681# Prefer a ksh shell builtin over an external printf program on Solaris,
16682# but without wasting forks for bash or zsh.
16683if test -z "$BASH_VERSION$ZSH_VERSION" \
16684 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16685 as_echo='print -r --'
16686 as_echo_n='print -rn --'
16687elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16688 as_echo='printf %s\n'
16689 as_echo_n='printf %s'
16690else
16691 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16692 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16693 as_echo_n='/usr/ucb/echo -n'
16694 else
16695 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16696 as_echo_n_body='eval
16697 arg=$1;
16698 case $arg in #(
16699 *"$as_nl"*)
16700 expr "X$arg" : "X\\(.*\\)$as_nl";
16701 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16702 esac;
16703 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16704 '
16705 export as_echo_n_body
16706 as_echo_n='sh -c $as_echo_n_body as_echo'
16707 fi
16708 export as_echo_body
16709 as_echo='sh -c $as_echo_body as_echo'
16710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
16712# The user is always right.
16713if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016714 PATH_SEPARATOR=:
16715 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16716 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16717 PATH_SEPARATOR=';'
16718 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721
16722# IFS
16723# We need space, tab and new line, in precisely that order. Quoting is
16724# there to prevent editors from complaining about space-tab.
16725# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16726# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727IFS=" "" $as_nl"
16728
16729# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016730as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016731case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732 *[\\/]* ) as_myself=$0 ;;
16733 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016734for as_dir in $PATH
16735do
16736 IFS=$as_save_IFS
16737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016738 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016740IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 ;;
16743esac
16744# We did not find ourselves, most probably we were run as `sh COMMAND'
16745# in which case we are not to be found in the path.
16746if test "x$as_myself" = x; then
16747 as_myself=$0
16748fi
16749if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016750 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16751 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752fi
16753
Matthias Kloseb9621712010-04-24 17:59:49 +000016754# Unset variables that we do not need and which cause bugs (e.g. in
16755# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16756# suppresses any "Segmentation fault" message there. '((' could
16757# trigger a bug in pdksh 5.2.14.
16758for as_var in BASH_ENV ENV MAIL MAILPATH
16759do eval test x\${$as_var+set} = xset \
16760 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761done
16762PS1='$ '
16763PS2='> '
16764PS4='+ '
16765
16766# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016767LC_ALL=C
16768export LC_ALL
16769LANGUAGE=C
16770export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771
Matthias Kloseb9621712010-04-24 17:59:49 +000016772# CDPATH.
16773(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16774
16775
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016776# as_fn_error STATUS ERROR [LINENO LOG_FD]
16777# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016778# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16779# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016780# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016781as_fn_error ()
16782{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016783 as_status=$1; test $as_status -eq 0 && as_status=1
16784 if test "$4"; then
16785 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16786 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016787 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016788 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016789 as_fn_exit $as_status
16790} # as_fn_error
16791
16792
16793# as_fn_set_status STATUS
16794# -----------------------
16795# Set $? to STATUS, without forking.
16796as_fn_set_status ()
16797{
16798 return $1
16799} # as_fn_set_status
16800
16801# as_fn_exit STATUS
16802# -----------------
16803# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16804as_fn_exit ()
16805{
16806 set +e
16807 as_fn_set_status $1
16808 exit $1
16809} # as_fn_exit
16810
16811# as_fn_unset VAR
16812# ---------------
16813# Portably unset VAR.
16814as_fn_unset ()
16815{
16816 { eval $1=; unset $1;}
16817}
16818as_unset=as_fn_unset
16819# as_fn_append VAR VALUE
16820# ----------------------
16821# Append the text in VALUE to the end of the definition contained in VAR. Take
16822# advantage of any shell optimizations that allow amortized linear growth over
16823# repeated appends, instead of the typical quadratic growth present in naive
16824# implementations.
16825if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16826 eval 'as_fn_append ()
16827 {
16828 eval $1+=\$2
16829 }'
16830else
16831 as_fn_append ()
16832 {
16833 eval $1=\$$1\$2
16834 }
16835fi # as_fn_append
16836
16837# as_fn_arith ARG...
16838# ------------------
16839# Perform arithmetic evaluation on the ARGs, and store the result in the
16840# global $as_val. Take advantage of shells that can avoid forks. The arguments
16841# must be portable across $(()) and expr.
16842if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16843 eval 'as_fn_arith ()
16844 {
16845 as_val=$(( $* ))
16846 }'
16847else
16848 as_fn_arith ()
16849 {
16850 as_val=`expr "$@" || test $? -eq 1`
16851 }
16852fi # as_fn_arith
16853
16854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855if expr a : '\(a\)' >/dev/null 2>&1 &&
16856 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16857 as_expr=expr
16858else
16859 as_expr=false
16860fi
16861
16862if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16863 as_basename=basename
16864else
16865 as_basename=false
16866fi
16867
Matthias Kloseb9621712010-04-24 17:59:49 +000016868if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16869 as_dirname=dirname
16870else
16871 as_dirname=false
16872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874as_me=`$as_basename -- "$0" ||
16875$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16876 X"$0" : 'X\(//\)$' \| \
16877 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016878$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016879 sed '/^.*\/\([^/][^/]*\)\/*$/{
16880 s//\1/
16881 q
16882 }
16883 /^X\/\(\/\/\)$/{
16884 s//\1/
16885 q
16886 }
16887 /^X\/\(\/\).*/{
16888 s//\1/
16889 q
16890 }
16891 s/.*/./; q'`
16892
Matthias Kloseb9621712010-04-24 17:59:49 +000016893# Avoid depending upon Character Ranges.
16894as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16895as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16896as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16897as_cr_digits='0123456789'
16898as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899
16900ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016901case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016905 xy) ECHO_C='\c';;
16906 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16907 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 esac;;
16909*)
16910 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016912
Martin v. Löwis11437992002-04-12 09:54:03 +000016913rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914if test -d conf$$.dir; then
16915 rm -f conf$$.dir/conf$$.file
16916else
16917 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016918 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016920if (echo >conf$$.file) 2>/dev/null; then
16921 if ln -s conf$$.file conf$$ 2>/dev/null; then
16922 as_ln_s='ln -s'
16923 # ... but there are two gotchas:
16924 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16925 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016926 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016927 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016928 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016929 elif ln conf$$.file conf$$ 2>/dev/null; then
16930 as_ln_s=ln
16931 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016932 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016934else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016935 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16938rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016939
Matthias Kloseb9621712010-04-24 17:59:49 +000016940
16941# as_fn_mkdir_p
16942# -------------
16943# Create "$as_dir" as a directory, including parents if necessary.
16944as_fn_mkdir_p ()
16945{
16946
16947 case $as_dir in #(
16948 -*) as_dir=./$as_dir;;
16949 esac
16950 test -d "$as_dir" || eval $as_mkdir_p || {
16951 as_dirs=
16952 while :; do
16953 case $as_dir in #(
16954 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16955 *) as_qdir=$as_dir;;
16956 esac
16957 as_dirs="'$as_qdir' $as_dirs"
16958 as_dir=`$as_dirname -- "$as_dir" ||
16959$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16960 X"$as_dir" : 'X\(//\)[^/]' \| \
16961 X"$as_dir" : 'X\(//\)$' \| \
16962 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16963$as_echo X"$as_dir" |
16964 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16965 s//\1/
16966 q
16967 }
16968 /^X\(\/\/\)[^/].*/{
16969 s//\1/
16970 q
16971 }
16972 /^X\(\/\/\)$/{
16973 s//\1/
16974 q
16975 }
16976 /^X\(\/\).*/{
16977 s//\1/
16978 q
16979 }
16980 s/.*/./; q'`
16981 test -d "$as_dir" && break
16982 done
16983 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016984 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016985
16986
16987} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016988if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016989 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016990else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016991 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016992 as_mkdir_p=false
16993fi
16994
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016995
16996# as_fn_executable_p FILE
16997# -----------------------
16998# Test if FILE is an executable regular file.
16999as_fn_executable_p ()
17000{
17001 test -f "$1" && test -x "$1"
17002} # as_fn_executable_p
17003as_test_x='test -x'
17004as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
17006# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017007as_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 +000017008
17009# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017010as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017011
17012
Martin v. Löwis11437992002-04-12 09:54:03 +000017013exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017014## ----------------------------------- ##
17015## Main body of $CONFIG_STATUS script. ##
17016## ----------------------------------- ##
17017_ASEOF
17018test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017019
Matthias Kloseb9621712010-04-24 17:59:49 +000017020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17021# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017022# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023# values after options handling.
17024ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017025This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017026generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
17028 CONFIG_FILES = $CONFIG_FILES
17029 CONFIG_HEADERS = $CONFIG_HEADERS
17030 CONFIG_LINKS = $CONFIG_LINKS
17031 CONFIG_COMMANDS = $CONFIG_COMMANDS
17032 $ $0 $@
17033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034on `(hostname || uname -n) 2>/dev/null | sed 1q`
17035"
17036
Martin v. Löwis11437992002-04-12 09:54:03 +000017037_ACEOF
17038
Matthias Kloseb9621712010-04-24 17:59:49 +000017039case $ac_config_files in *"
17040"*) set x $ac_config_files; shift; ac_config_files=$*;;
17041esac
17042
17043case $ac_config_headers in *"
17044"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17045esac
17046
17047
17048cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017049# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017050config_files="$ac_config_files"
17051config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017054
Matthias Kloseb9621712010-04-24 17:59:49 +000017055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017056ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017057\`$as_me' instantiates files and other configuration actions
17058from templates according to the current configuration. Unless the files
17059and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017060
Matthias Kloseb9621712010-04-24 17:59:49 +000017061Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017062
17063 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 --config print configuration, then exit
17066 -q, --quiet, --silent
17067 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017068 -d, --debug don't remove temporary files
17069 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017070 --file=FILE[:TEMPLATE]
17071 instantiate the configuration file FILE
17072 --header=FILE[:TEMPLATE]
17073 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017074
17075Configuration files:
17076$config_files
17077
17078Configuration headers:
17079$config_headers
17080
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017081Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17085ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017086ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017087python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017088configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017090
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017091Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017092This config.status script is free software; the Free Software Foundation
17093gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094
17095ac_pwd='$ac_pwd'
17096srcdir='$srcdir'
17097INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017098MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017099test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017100_ACEOF
17101
Matthias Kloseb9621712010-04-24 17:59:49 +000017102cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17103# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017104ac_need_defaults=:
17105while test $# != 0
17106do
17107 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017108 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17110 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017113 --*=)
17114 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17115 ac_optarg=
17116 ac_shift=:
17117 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017119 ac_option=$1
17120 ac_optarg=$2
17121 ac_shift=shift
17122 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017123 esac
17124
Skip Montanaro6dead952003-09-25 14:50:04 +000017125 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017126 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017127 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17128 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017129 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 $as_echo "$ac_cs_version"; exit ;;
17131 --config | --confi | --conf | --con | --co | --c )
17132 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017134 debug=: ;;
17135 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017136 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017137 case $ac_optarg in
17138 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017139 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017140 esac
17141 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 ac_need_defaults=false;;
17143 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017144 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017145 case $ac_optarg in
17146 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17147 esac
17148 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150 --he | --h)
17151 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017152 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017153Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017154 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017155 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017156 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17157 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17158 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017159
17160 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017161 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017162Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017163
Matthias Kloseb9621712010-04-24 17:59:49 +000017164 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017166
17167 esac
17168 shift
17169done
17170
Skip Montanaro6dead952003-09-25 14:50:04 +000017171ac_configure_extra_args=
17172
17173if $ac_cs_silent; then
17174 exec 6>/dev/null
17175 ac_configure_extra_args="$ac_configure_extra_args --silent"
17176fi
17177
17178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017180if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017181 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017182 shift
17183 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17184 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017186 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017187fi
17188
Martin v. Löwis11437992002-04-12 09:54:03 +000017189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191exec 5>>config.log
17192{
17193 echo
17194 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17195## Running $as_me. ##
17196_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017197 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017203
Matthias Kloseb9621712010-04-24 17:59:49 +000017204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205
17206# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017207for ac_config_target in $ac_config_targets
17208do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209 case $ac_config_target in
17210 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17211 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17212 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017213 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17214 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17216 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017217 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017218 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017219 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220
Victor Stinnere0be4232011-10-25 13:06:09 +020017221 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 esac
17223done
17224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225
Martin v. Löwis11437992002-04-12 09:54:03 +000017226# If the user did not use the arguments to specify the items to instantiate,
17227# then the envvar interface is used. Set only those that are not.
17228# We use the long form for the default assignment because of an extremely
17229# bizarre bug on SunOS 4.1.3.
17230if $ac_need_defaults; then
17231 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17232 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17233fi
17234
Skip Montanaro6dead952003-09-25 14:50:04 +000017235# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017237# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238# Hook for its removal unless debugging.
17239# Note that there is a small window in which the directory will not be cleaned:
17240# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017241$debug ||
17242{
Victor Stinnere0be4232011-10-25 13:06:09 +020017243 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017245 : "${ac_tmp:=$tmp}"
17246 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017248 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017249}
Martin v. Löwis11437992002-04-12 09:54:03 +000017250# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017251
Martin v. Löwis11437992002-04-12 09:54:03 +000017252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017254 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017255} ||
17256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 tmp=./conf$$-$RANDOM
17258 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017259} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017260ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017261
Matthias Kloseb9621712010-04-24 17:59:49 +000017262# Set up the scripts for CONFIG_FILES section.
17263# No need to generate them if there are no CONFIG_FILES.
17264# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017266
Matthias Kloseb9621712010-04-24 17:59:49 +000017267
17268ac_cr=`echo X | tr X '\015'`
17269# On cygwin, bash can eat \r inside `` if the user requested igncr.
17270# But we know of no other shell where ac_cr would be empty at this
17271# point, so we can use a bashism as a fallback.
17272if test "x$ac_cr" = x; then
17273 eval ac_cr=\$\'\\r\'
17274fi
17275ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17276if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017278else
17279 ac_cs_awk_cr=$ac_cr
17280fi
17281
Victor Stinnere0be4232011-10-25 13:06:09 +020017282echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017283_ACEOF
17284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285
Matthias Kloseb9621712010-04-24 17:59:49 +000017286{
17287 echo "cat >conf$$subs.awk <<_ACEOF" &&
17288 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17289 echo "_ACEOF"
17290} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017291 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17292ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293ac_delim='%!_!# '
17294for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017295 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017296 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17299 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300 break
17301 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017302 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 else
17304 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306done
Matthias Kloseb9621712010-04-24 17:59:49 +000017307rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308
Matthias Kloseb9621712010-04-24 17:59:49 +000017309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017310cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017312sed -n '
17313h
17314s/^/S["/; s/!.*/"]=/
17315p
17316g
17317s/^[^!]*!//
17318:repl
17319t repl
17320s/'"$ac_delim"'$//
17321t delim
17322:nl
17323h
17324s/\(.\{148\}\)..*/\1/
17325t more1
17326s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17327p
17328n
17329b repl
17330:more1
17331s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17332p
17333g
17334s/.\{148\}//
17335t nl
17336:delim
17337h
17338s/\(.\{148\}\)..*/\1/
17339t more2
17340s/["\\]/\\&/g; s/^/"/; s/$/"/
17341p
17342b
17343:more2
17344s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17345p
17346g
17347s/.\{148\}//
17348t delim
17349' <conf$$subs.awk | sed '
17350/^[^""]/{
17351 N
17352 s/\n//
17353}
17354' >>$CONFIG_STATUS || ac_write_fail=1
17355rm -f conf$$subs.awk
17356cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17357_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017358cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017359 for (key in S) S_is_set[key] = 1
17360 FS = ""
17361
17362}
17363{
17364 line = $ 0
17365 nfields = split(line, field, "@")
17366 substed = 0
17367 len = length(field[1])
17368 for (i = 2; i < nfields; i++) {
17369 key = field[i]
17370 keylen = length(key)
17371 if (S_is_set[key]) {
17372 value = S[key]
17373 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17374 len += length(value) + length(field[++i])
17375 substed = 1
17376 } else
17377 len += 1 + keylen
17378 }
17379
17380 print line
17381}
17382
17383_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17386if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17387 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17388else
17389 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017390fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017391 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017392_ACEOF
17393
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017394# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17395# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396# trailing colons and then remove the whole line if VPATH becomes empty
17397# (actually we leave an empty line to preserve line numbers).
17398if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017399 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17400h
17401s///
17402s/^/:/
17403s/[ ]*$/:/
17404s/:\$(srcdir):/:/g
17405s/:\${srcdir}:/:/g
17406s/:@srcdir@:/:/g
17407s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017409x
17410s/\(=[ ]*\).*/\1/
17411G
17412s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413s/^[^=]*=[ ]*$//
17414}'
17415fi
17416
Matthias Kloseb9621712010-04-24 17:59:49 +000017417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017418fi # test -n "$CONFIG_FILES"
17419
Matthias Kloseb9621712010-04-24 17:59:49 +000017420# Set up the scripts for CONFIG_HEADERS section.
17421# No need to generate them if there are no CONFIG_HEADERS.
17422# This happens for instance with `./config.status Makefile'.
17423if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017424cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017425BEGIN {
17426_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427
Matthias Kloseb9621712010-04-24 17:59:49 +000017428# Transform confdefs.h into an awk script `defines.awk', embedded as
17429# here-document in config.status, that substitutes the proper values into
17430# config.h.in to produce config.h.
17431
17432# Create a delimiter string that does not exist in confdefs.h, to ease
17433# handling of long lines.
17434ac_delim='%!_!# '
17435for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017436 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17437 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017438 break
17439 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017440 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017441 else
17442 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17443 fi
17444done
17445
17446# For the awk script, D is an array of macro values keyed by name,
17447# likewise P contains macro parameters if any. Preserve backslash
17448# newline sequences.
17449
17450ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17451sed -n '
17452s/.\{148\}/&'"$ac_delim"'/g
17453t rset
17454:rset
17455s/^[ ]*#[ ]*define[ ][ ]*/ /
17456t def
17457d
17458:def
17459s/\\$//
17460t bsnl
17461s/["\\]/\\&/g
17462s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17463D["\1"]=" \3"/p
17464s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17465d
17466:bsnl
17467s/["\\]/\\&/g
17468s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17469D["\1"]=" \3\\\\\\n"\\/p
17470t cont
17471s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17472t cont
17473d
17474:cont
17475n
17476s/.\{148\}/&'"$ac_delim"'/g
17477t clear
17478:clear
17479s/\\$//
17480t bsnlc
17481s/["\\]/\\&/g; s/^/"/; s/$/"/p
17482d
17483:bsnlc
17484s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17485b cont
17486' <confdefs.h | sed '
17487s/'"$ac_delim"'/"\\\
17488"/g' >>$CONFIG_STATUS || ac_write_fail=1
17489
17490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17491 for (key in D) D_is_set[key] = 1
17492 FS = ""
17493}
17494/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17495 line = \$ 0
17496 split(line, arg, " ")
17497 if (arg[1] == "#") {
17498 defundef = arg[2]
17499 mac1 = arg[3]
17500 } else {
17501 defundef = substr(arg[1], 2)
17502 mac1 = arg[2]
17503 }
17504 split(mac1, mac2, "(") #)
17505 macro = mac2[1]
17506 prefix = substr(line, 1, index(line, defundef) - 1)
17507 if (D_is_set[macro]) {
17508 # Preserve the white space surrounding the "#".
17509 print prefix "define", macro P[macro] D[macro]
17510 next
17511 } else {
17512 # Replace #undef with comments. This is necessary, for example,
17513 # in the case of _POSIX_SOURCE, which is predefined and required
17514 # on some systems where configure will not decide to define it.
17515 if (defundef == "undef") {
17516 print "/*", prefix defundef, macro, "*/"
17517 next
17518 }
17519 }
17520}
17521{ print }
17522_ACAWK
17523_ACEOF
17524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017525 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017526fi # test -n "$CONFIG_HEADERS"
17527
17528
17529eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17530shift
17531for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532do
17533 case $ac_tag in
17534 :[FHLC]) ac_mode=$ac_tag; continue;;
17535 esac
17536 case $ac_mode$ac_tag in
17537 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017538 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539 :[FH]-) ac_tag=-:-;;
17540 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17541 esac
17542 ac_save_IFS=$IFS
17543 IFS=:
17544 set x $ac_tag
17545 IFS=$ac_save_IFS
17546 shift
17547 ac_file=$1
17548 shift
17549
17550 case $ac_mode in
17551 :L) ac_source=$1;;
17552 :[FH])
17553 ac_file_inputs=
17554 for ac_f
17555 do
17556 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017557 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 *) # Look for the file first in the build tree, then in the source tree
17559 # (if the path is not absolute). The absolute path cannot be DOS-style,
17560 # because $ac_f cannot contain `:'.
17561 test -f "$ac_f" ||
17562 case $ac_f in
17563 [\\/$]*) false;;
17564 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17565 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017566 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17569 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570 done
17571
17572 # Let's still pretend it is `configure' which instantiates (i.e., don't
17573 # use $as_me), people would be surprised to read:
17574 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017575 configure_input='Generated from '`
17576 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17577 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578 if test x"$ac_file" != x-; then
17579 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17581$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017583 # Neutralize special characters interpreted by sed in replacement strings.
17584 case $configure_input in #(
17585 *\&* | *\|* | *\\* )
17586 ac_sed_conf_input=`$as_echo "$configure_input" |
17587 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17588 *) ac_sed_conf_input=$configure_input;;
17589 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590
17591 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017592 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17593 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 esac
17595 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 esac
17597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017599$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017600 X"$ac_file" : 'X\(//\)[^/]' \| \
17601 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017603$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017604 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17605 s//\1/
17606 q
17607 }
17608 /^X\(\/\/\)[^/].*/{
17609 s//\1/
17610 q
17611 }
17612 /^X\(\/\/\)$/{
17613 s//\1/
17614 q
17615 }
17616 /^X\(\/\).*/{
17617 s//\1/
17618 q
17619 }
17620 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017621 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 ac_builddir=.
17623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624case "$ac_dir" in
17625.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17626*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017629 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630 case $ac_top_builddir_sub in
17631 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17632 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17633 esac ;;
17634esac
17635ac_abs_top_builddir=$ac_pwd
17636ac_abs_builddir=$ac_pwd$ac_dir_suffix
17637# for backward compatibility:
17638ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017639
17640case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 ac_top_srcdir=$ac_top_builddir_sub
17644 ac_abs_top_srcdir=$ac_pwd ;;
17645 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 ac_top_srcdir=$srcdir
17648 ac_abs_top_srcdir=$srcdir ;;
17649 *) # Relative name.
17650 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17651 ac_top_srcdir=$ac_top_build_prefix$srcdir
17652 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017653esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017655
Martin v. Löwis11437992002-04-12 09:54:03 +000017656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 case $ac_mode in
17658 :F)
17659 #
17660 # CONFIG_FILE
17661 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017662
17663 case $INSTALL in
17664 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017667 ac_MKDIR_P=$MKDIR_P
17668 case $MKDIR_P in
17669 [\\/$]* | ?:[\\/]* ) ;;
17670 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17671 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673
Matthias Kloseb9621712010-04-24 17:59:49 +000017674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675# If the template does not know about datarootdir, expand it.
17676# FIXME: This hack should be removed a few years after 2.60.
17677ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017678ac_sed_dataroot='
17679/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 p
17681 q
17682}
17683/@datadir@/p
17684/@docdir@/p
17685/@infodir@/p
17686/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017687/@mandir@/p'
17688case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689*datarootdir*) ac_datarootdir_seen=yes;;
17690*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17692$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695 ac_datarootdir_hack='
17696 s&@datadir@&$datadir&g
17697 s&@docdir@&$docdir&g
17698 s&@infodir@&$infodir&g
17699 s&@localedir@&$localedir&g
17700 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702esac
17703_ACEOF
17704
17705# Neutralize VPATH when `$srcdir' = `.'.
17706# Shell code in configure.ac might set extrasub.
17707# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17709ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017710$extrasub
17711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017713:t
17714/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017715s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017717s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718s&@srcdir@&$ac_srcdir&;t t
17719s&@abs_srcdir@&$ac_abs_srcdir&;t t
17720s&@top_srcdir@&$ac_top_srcdir&;t t
17721s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17722s&@builddir@&$ac_builddir&;t t
17723s&@abs_builddir@&$ac_abs_builddir&;t t
17724s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17725s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017726s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017728"
Victor Stinnere0be4232011-10-25 13:06:09 +020017729eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17730 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017733 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17734 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17735 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017737which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017738$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017739which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017740
Victor Stinnere0be4232011-10-25 13:06:09 +020017741 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017743 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17744 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017746 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 ;;
17748 :H)
17749 #
17750 # CONFIG_HEADER
17751 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 {
17754 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017755 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17756 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017757 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017758 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017759 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17760$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017763 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017764 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 fi
17766 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017768 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017769 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773
17774 esac
17775
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017776
17777 case $ac_file$ac_mode in
17778 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17779
17780 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781done # for ac_tag
17782
Guido van Rossum627b2d71993-12-24 10:39:16 +000017783
Matthias Kloseb9621712010-04-24 17:59:49 +000017784as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017785_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017786ac_clean_files=$ac_clean_files_save
17787
Matthias Kloseb9621712010-04-24 17:59:49 +000017788test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017789 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017790
Martin v. Löwis11437992002-04-12 09:54:03 +000017791
17792# configure is writing to config.log, and then calls config.status.
17793# config.status does its own redirection, appending to config.log.
17794# Unfortunately, on DOS this fails, as config.log is still kept open
17795# by configure, so config.status won't be able to write to it; its
17796# output is simply discarded. So we exec the FD to /dev/null,
17797# effectively closing config.log, so it can be properly (re)opened and
17798# appended to by config.status. When coming back to configure, we
17799# need to make the FD available again.
17800if test "$no_create" != yes; then
17801 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017802 ac_config_status_args=
17803 test "$silent" = yes &&
17804 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017805 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017806 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 exec 5>>config.log
17808 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17809 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017810 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017811fi
17812if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17814$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017815fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017816
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017817
Christian Heimes75ed8902013-11-20 01:11:18 +010017818echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017819if test ! -f Modules/Setup
17820then
17821 cp $srcdir/Modules/Setup.dist Modules/Setup
17822fi
17823
Christian Heimes75ed8902013-11-20 01:11:18 +010017824echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017825if test ! -f Modules/Setup.local
17826then
17827 echo "# Edit this file for local setup changes" >Modules/Setup.local
17828fi
17829
Christian Heimes75ed8902013-11-20 01:11:18 +010017830echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017831$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17832 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017833 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017834mv config.c Modules