blob: 0d730451057eeece167d4eb9dd6075ac30308d38 [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
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
1977# ac_fn_c_find_uintX_t LINENO BITS VAR
1978# ------------------------------------
1979# Finds an unsigned integer type with width BITS, setting cache variable VAR
1980# accordingly.
1981ac_fn_c_find_uintX_t ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1985$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001986if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001987 $as_echo_n "(cached) " >&6
1988else
1989 eval "$3=no"
1990 # Order is important - never check a type that is potentially smaller
1991 # than half of the expected target width.
1992 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1993 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$ac_includes_default
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 case $ac_type in #(
2010 uint$2_t) :
2011 eval "$3=yes" ;; #(
2012 *) :
2013 eval "$3=\$ac_type" ;;
2014esac
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002017 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019else
2020 break
2021fi
2022 done
2023fi
2024eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029} # ac_fn_c_find_uintX_t
2030
2031# ac_fn_c_find_intX_t LINENO BITS VAR
2032# -----------------------------------
2033# Finds a signed integer type with width BITS, setting cache variable VAR
2034# accordingly.
2035ac_fn_c_find_intX_t ()
2036{
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2039$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002041 $as_echo_n "(cached) " >&6
2042else
2043 eval "$3=no"
2044 # Order is important - never check a type that is potentially smaller
2045 # than half of the expected target width.
2046 for ac_type in int$2_t 'int' 'long int' \
2047 'long long int' 'short int' 'signed char'; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002051 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002052int
2053main ()
2054{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002056test_array [0] = 0;
2057return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002067 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002068int
2069main ()
2070{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002071static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002072 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081
2082else
2083 case $ac_type in #(
2084 int$2_t) :
2085 eval "$3=yes" ;; #(
2086 *) :
2087 eval "$3=\$ac_type" ;;
2088esac
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002093 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095else
2096 break
2097fi
2098 done
2099fi
2100eval ac_res=\$$3
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002103 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105} # ac_fn_c_find_intX_t
2106
2107# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2108# --------------------------------------------
2109# Tries to find the compile-time value of EXPR in a program that includes
2110# INCLUDES, setting VAR accordingly. Returns whether the value could be
2111# computed
2112ac_fn_c_compute_int ()
2113{
2114 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2115 if test "$cross_compiling" = yes; then
2116 # Depending upon the size, compute the lo and hi bounds.
2117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120int
2121main ()
2122{
2123static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002124test_array [0] = 0;
2125return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002126
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132 ac_lo=0 ac_mid=0
2133 while :; do
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002141test_array [0] = 0;
2142return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_hi=$ac_mid; break
2150else
2151 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2152 if test $ac_lo -le $ac_mid; then
2153 ac_lo= ac_hi=
2154 break
2155 fi
2156 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159 done
2160else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164int
2165main ()
2166{
2167static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002168test_array [0] = 0;
2169return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002170
2171 ;
2172 return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"; then :
2176 ac_hi=-1 ac_mid=-1
2177 while :; do
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180$4
2181int
2182main ()
2183{
2184static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002185test_array [0] = 0;
2186return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193 ac_lo=$ac_mid; break
2194else
2195 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2196 if test $ac_mid -le $ac_hi; then
2197 ac_lo= ac_hi=
2198 break
2199 fi
2200 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203 done
2204else
2205 ac_lo= ac_hi=
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210# Binary search between lo and hi bounds.
2211while test "x$ac_lo" != "x$ac_hi"; do
2212 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216int
2217main ()
2218{
2219static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002220test_array [0] = 0;
2221return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002222
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228 ac_hi=$ac_mid
2229else
2230 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233done
2234case $ac_lo in #((
2235?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2236'') ac_retval=1 ;;
2237esac
2238 else
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242static long int longval () { return $2; }
2243static unsigned long int ulongval () { return $2; }
2244#include <stdio.h>
2245#include <stdlib.h>
2246int
2247main ()
2248{
2249
2250 FILE *f = fopen ("conftest.val", "w");
2251 if (! f)
2252 return 1;
2253 if (($2) < 0)
2254 {
2255 long int i = longval ();
2256 if (i != ($2))
2257 return 1;
2258 fprintf (f, "%ld", i);
2259 }
2260 else
2261 {
2262 unsigned long int i = ulongval ();
2263 if (i != ($2))
2264 return 1;
2265 fprintf (f, "%lu", i);
2266 }
2267 /* Do not output a trailing newline, as this causes \r\n confusion
2268 on some platforms. */
2269 return ferror (f) || fclose (f) != 0;
2270
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_run "$LINENO"; then :
2276 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2277else
2278 ac_retval=1
2279fi
2280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2281 conftest.$ac_objext conftest.beam conftest.$ac_ext
2282rm -f conftest.val
2283
2284 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002285 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 as_fn_set_status $ac_retval
2287
2288} # ac_fn_c_compute_int
2289
2290# ac_fn_c_check_func LINENO FUNC VAR
2291# ----------------------------------
2292# Tests whether FUNC exists, setting the cache variable VAR accordingly
2293ac_fn_c_check_func ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002298if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2305#define $2 innocuous_$2
2306
2307/* System header to define __stub macros and hopefully few prototypes,
2308 which can conflict with char $2 (); below.
2309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2310 <limits.h> exists even on freestanding compilers. */
2311
2312#ifdef __STDC__
2313# include <limits.h>
2314#else
2315# include <assert.h>
2316#endif
2317
2318#undef $2
2319
2320/* Override any GCC internal prototype to avoid an error.
2321 Use char because int might match the return type of a GCC
2322 builtin and then its argument prototype would still apply. */
2323#ifdef __cplusplus
2324extern "C"
2325#endif
2326char $2 ();
2327/* The GNU C library defines this for functions which it implements
2328 to always fail with ENOSYS. Some functions are actually named
2329 something starting with __ and the normal name is an alias. */
2330#if defined __stub_$2 || defined __stub___$2
2331choke me
2332#endif
2333
2334int
2335main ()
2336{
2337return $2 ();
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_link "$LINENO"; then :
2343 eval "$3=yes"
2344else
2345 eval "$3=no"
2346fi
2347rm -f core conftest.err conftest.$ac_objext \
2348 conftest$ac_exeext conftest.$ac_ext
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002354
2355} # ac_fn_c_check_func
2356
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002357# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2358# ---------------------------------------------
2359# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2360# accordingly.
2361ac_fn_c_check_decl ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 as_decl_name=`echo $2|sed 's/ *(.*//'`
2365 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2367$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2368if eval \${$3+:} false; then :
2369 $as_echo_n "(cached) " >&6
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$4
2374int
2375main ()
2376{
2377#ifndef $as_decl_name
2378#ifdef __cplusplus
2379 (void) $as_decl_use;
2380#else
2381 (void) $as_decl_name;
2382#endif
2383#endif
2384
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$3=yes"
2391else
2392 eval "$3=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396eval ac_res=\$$3
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2398$as_echo "$ac_res" >&6; }
2399 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2400
2401} # ac_fn_c_check_decl
2402
Matthias Kloseb9621712010-04-24 17:59:49 +00002403# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2404# ----------------------------------------------------
2405# Tries to find if the field MEMBER exists in type AGGR, after including
2406# INCLUDES, setting cache variable VAR accordingly.
2407ac_fn_c_check_member ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2411$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002412if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 $as_echo_n "(cached) " >&6
2414else
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$5
2418int
2419main ()
2420{
2421static $2 ac_aggr;
2422if (ac_aggr.$3)
2423return 0;
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$4=yes"
2430else
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h. */
2433$5
2434int
2435main ()
2436{
2437static $2 ac_aggr;
2438if (sizeof ac_aggr.$3)
2439return 0;
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
2445 eval "$4=yes"
2446else
2447 eval "$4=no"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453eval ac_res=\$$4
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2455$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002456 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002457
2458} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002460This file contains any messages produced by compilers while
2461running configure, to aid debugging if configure makes a mistake.
2462
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002463It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002464generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002465
2466 $ $0 $@
2467
2468_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002470{
2471cat <<_ASUNAME
2472## --------- ##
2473## Platform. ##
2474## --------- ##
2475
2476hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2477uname -m = `(uname -m) 2>/dev/null || echo unknown`
2478uname -r = `(uname -r) 2>/dev/null || echo unknown`
2479uname -s = `(uname -s) 2>/dev/null || echo unknown`
2480uname -v = `(uname -v) 2>/dev/null || echo unknown`
2481
2482/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2483/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2484
2485/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2486/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002489/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2490/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2491/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2492
2493_ASUNAME
2494
2495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2496for as_dir in $PATH
2497do
2498 IFS=$as_save_IFS
2499 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "PATH: $as_dir"
2501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504} >&5
2505
2506cat >&5 <<_ACEOF
2507
2508
2509## ----------- ##
2510## Core tests. ##
2511## ----------- ##
2512
2513_ACEOF
2514
2515
2516# Keep a trace of the command line.
2517# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002519# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002522ac_configure_args0=
2523ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_must_keep_next=false
2525for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002526do
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 for ac_arg
2528 do
2529 case $ac_arg in
2530 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2532 | -silent | --silent | --silen | --sile | --sil)
2533 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 esac
2537 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 case $ac_arg in
2545 *=* | --config-cache | -C | -disable-* | --disable-* \
2546 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2547 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2548 | -with-* | --with-* | -without-* | --without-* | --x)
2549 case "$ac_configure_args0 " in
2550 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2551 esac
2552 ;;
2553 -* ) ac_must_keep_next=true ;;
2554 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 ;;
2558 esac
2559 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002560done
Matthias Kloseb9621712010-04-24 17:59:49 +00002561{ ac_configure_args0=; unset ac_configure_args0;}
2562{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002563
2564# When interrupted or exit'd, cleanup temporary files, and complete
2565# config.log. We remove comments because anyway the quotes in there
2566# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567# WARNING: Use '\'' to represent an apostrophe within the trap.
2568# 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 +00002569trap 'exit_status=$?
2570 # Save into config.log some information that might help in debugging.
2571 {
2572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002575## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo
2578 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579(
2580 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2581 eval ac_val=\$$ac_var
2582 case $ac_val in #(
2583 *${as_nl}*)
2584 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2586$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 esac
2588 case $ac_var in #(
2589 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2591 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 esac ;;
2593 esac
2594 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2597 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 "s/'\''/'\''\\\\'\'''\''/g;
2600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2601 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002602 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 esac |
2606 sort
2607)
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002609
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002610 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002611## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 echo
2614 for ac_var in $ac_subst_vars
2615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_val=\$$ac_var
2617 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002621 done | sort
2622 echo
2623
2624 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002625 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002628 echo
2629 for ac_var in $ac_subst_files
2630 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_val=\$$ac_var
2632 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002636 done | sort
2637 echo
2638 fi
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002641 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002642## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
2647 fi
2648 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 $as_echo "$as_me: caught signal $ac_signal"
2650 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 rm -f core *.core core.conftest.* &&
2653 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002656for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002658done
2659ac_signal=0
2660
2661# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664$as_echo "/* confdefs.h */" > confdefs.h
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666# Predefined preprocessor variables.
2667
2668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_NAME "$PACKAGE_NAME"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_VERSION "$PACKAGE_VERSION"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_STRING "$PACKAGE_STRING"
2682_ACEOF
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2686_ACEOF
2687
Matthias Kloseb9621712010-04-24 17:59:49 +00002688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_URL "$PACKAGE_URL"
2690_ACEOF
2691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692
2693# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002694# Prefer an explicitly selected file to automatically selected ones.
2695ac_site_file1=NONE
2696ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002698 # We do not want a PATH search for config.site.
2699 case $CONFIG_SITE in #((
2700 -*) ac_site_file1=./$CONFIG_SITE;;
2701 */*) ac_site_file1=$CONFIG_SITE;;
2702 *) ac_site_file1=./$CONFIG_SITE;;
2703 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 ac_site_file1=$prefix/share/config.site
2706 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707else
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 ac_site_file1=$ac_default_prefix/share/config.site
2709 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002711for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712do
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 test "x$ac_site_file" = xNONE && continue
2714 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2716$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002718 . "$ac_site_file" \
2719 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2721as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002722See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723 fi
2724done
2725
2726if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # Some versions of bash will fail to source /dev/null (special files
2728 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2729 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2731$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2734 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 esac
2736 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737else
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2739$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 >$cache_file
2741fi
2742
2743# Check that the precious variables saved in the cache have kept the same
2744# value.
2745ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2748 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002749 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2750 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 case $ac_old_set,$ac_new_set in
2752 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2754$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 +00002755 ac_cache_corrupted=: ;;
2756 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2758$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 ac_cache_corrupted=: ;;
2760 ,);;
2761 *)
2762 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 # differences in whitespace do not lead to failure.
2764 ac_old_val_w=`echo x $ac_old_val`
2765 ac_new_val_w=`echo x $ac_new_val`
2766 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2768$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2769 ac_cache_corrupted=:
2770 else
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2772$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2773 eval $ac_var=\$ac_old_val
2774 fi
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2776$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2778$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 fi;;
2780 esac
2781 # Pass precious variables to config.status.
2782 if test "$ac_new_set" = set; then
2783 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 *) ac_arg=$ac_var=$ac_new_val ;;
2786 esac
2787 case " $ac_configure_args " in
2788 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 esac
2791 fi
2792done
2793if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2797$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002798 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002800## -------------------- ##
2801## Main body of script. ##
2802## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803
Guido van Rossum7f43da71994-08-01 12:15:30 +00002804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810
Michael W. Hudson54241132001-12-07 15:38:26 +00002811
Trent Nelson4d4ec652012-10-16 08:51:24 -04002812
Trent Nelson5595ab52012-10-17 04:47:31 -04002813if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814 # If we're building out-of-tree, we need to make sure the following
2815 # resources get picked up before their $srcdir counterparts.
2816 # Objects/ -> typeslots.inc
2817 # Include/ -> Python-ast.h, graminit.h
2818 # Python/ -> importlib.h
2819 # (A side effect of this is that these resources will automatically be
2820 # regenerated when building out-of-tree, regardless of whether or not
2821 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2822 # off.)
2823 BASECPPFLAGS="-IObjects -IInclude -IPython"
2824else
2825 BASECPPFLAGS=""
2826fi
2827
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828
2829
2830
2831
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002832if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833then
2834# Extract the first word of "hg", so it can be a program name with args.
2835set dummy hg; ac_word=$2
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002838if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 $as_echo_n "(cached) " >&6
2840else
2841 if test -n "$HAS_HG"; then
2842 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2843else
2844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2845for as_dir in $PATH
2846do
2847 IFS=$as_save_IFS
2848 test -z "$as_dir" && as_dir=.
2849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002851 ac_cv_prog_HAS_HG="found"
2852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2853 break 2
2854 fi
2855done
2856 done
2857IFS=$as_save_IFS
2858
2859 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2860fi
2861fi
2862HAS_HG=$ac_cv_prog_HAS_HG
2863if test -n "$HAS_HG"; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2865$as_echo "$HAS_HG" >&6; }
2866else
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
2869fi
2870
2871
2872else
2873HAS_HG=no-repository
2874fi
2875if test $HAS_HG = found
2876then
2877 HGVERSION="hg id -i \$(srcdir)"
2878 HGTAG="hg id -t \$(srcdir)"
2879 HGBRANCH="hg id -b \$(srcdir)"
2880else
2881 HGVERSION=""
2882 HGTAG=""
2883 HGBRANCH=""
2884fi
2885
2886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002888
2889
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890ac_aux_dir=
2891for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2892 if test -f "$ac_dir/install-sh"; then
2893 ac_aux_dir=$ac_dir
2894 ac_install_sh="$ac_aux_dir/install-sh -c"
2895 break
2896 elif test -f "$ac_dir/install.sh"; then
2897 ac_aux_dir=$ac_dir
2898 ac_install_sh="$ac_aux_dir/install.sh -c"
2899 break
2900 elif test -f "$ac_dir/shtool"; then
2901 ac_aux_dir=$ac_dir
2902 ac_install_sh="$ac_aux_dir/shtool install -c"
2903 break
2904 fi
2905done
2906if test -z "$ac_aux_dir"; then
2907 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2917
2918
2919# Make sure we can run config.sub.
2920$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2921 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2922
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2924$as_echo_n "checking build system type... " >&6; }
2925if ${ac_cv_build+:} false; then :
2926 $as_echo_n "(cached) " >&6
2927else
2928 ac_build_alias=$build_alias
2929test "x$ac_build_alias" = x &&
2930 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2931test "x$ac_build_alias" = x &&
2932 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2933ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2934 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2935
2936fi
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2938$as_echo "$ac_cv_build" >&6; }
2939case $ac_cv_build in
2940*-*-*) ;;
2941*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2942esac
2943build=$ac_cv_build
2944ac_save_IFS=$IFS; IFS='-'
2945set x $ac_cv_build
2946shift
2947build_cpu=$1
2948build_vendor=$2
2949shift; shift
2950# Remember, the first character of IFS is used to create $*,
2951# except with old shells:
2952build_os=$*
2953IFS=$ac_save_IFS
2954case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2955
2956
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2958$as_echo_n "checking host system type... " >&6; }
2959if ${ac_cv_host+:} false; then :
2960 $as_echo_n "(cached) " >&6
2961else
2962 if test "x$host_alias" = x; then
2963 ac_cv_host=$ac_cv_build
2964else
2965 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2966 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2967fi
2968
2969fi
2970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2971$as_echo "$ac_cv_host" >&6; }
2972case $ac_cv_host in
2973*-*-*) ;;
2974*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2975esac
2976host=$ac_cv_host
2977ac_save_IFS=$IFS; IFS='-'
2978set x $ac_cv_host
2979shift
2980host_cpu=$1
2981host_vendor=$2
2982shift; shift
2983# Remember, the first character of IFS is used to create $*,
2984# except with old shells:
2985host_os=$*
2986IFS=$ac_save_IFS
2987case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2988
2989
2990
doko@python.orga10e4a92013-01-25 18:45:12 +01002991
2992
Ned Deilyfcbc2462014-08-22 13:32:49 -07002993# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2994rm -f pybuilddir.txt
2995
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002996for ac_prog in python$PACKAGE_VERSION python3 python
2997do
2998 # Extract the first word of "$ac_prog", so it can be a program name with args.
2999set dummy $ac_prog; ac_word=$2
3000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3001$as_echo_n "checking for $ac_word... " >&6; }
3002if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
3003 $as_echo_n "(cached) " >&6
3004else
3005 if test -n "$PYTHON_FOR_GEN"; then
3006 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
3007else
3008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3009for as_dir in $PATH
3010do
3011 IFS=$as_save_IFS
3012 test -z "$as_dir" && as_dir=.
3013 for ac_exec_ext in '' $ac_executable_extensions; do
3014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3015 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3017 break 2
3018 fi
3019done
3020 done
3021IFS=$as_save_IFS
3022
3023fi
3024fi
3025PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3026if test -n "$PYTHON_FOR_GEN"; then
3027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3028$as_echo "$PYTHON_FOR_GEN" >&6; }
3029else
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3031$as_echo "no" >&6; }
3032fi
3033
3034
3035 test -n "$PYTHON_FOR_GEN" && break
3036done
3037test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3038
3039if test "$PYTHON_FOR_GEN" = not-found; then
3040 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3041 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3042 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3043fi
3044
3045
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003046if test "$cross_compiling" = yes; then
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3048$as_echo_n "checking for python interpreter for cross build... " >&6; }
3049 if test -z "$PYTHON_FOR_BUILD"; then
3050 for interp in python$PACKAGE_VERSION python3 python; do
3051 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003052 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 +02003053 break
3054 fi
3055 interp=
3056 done
3057 if test x$interp = x; then
3058 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3059 fi
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3061$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003062 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 +02003063 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003064 # Used to comment out stuff for rebuilding generated files
3065 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003066elif test "$cross_compiling" = maybe; then
3067 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003068else
3069 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003070 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003071fi
3072
3073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074
Martin Pantereac67be2016-07-28 01:28:27 +00003075
Benjamin Petersond23f8222009-04-05 19:13:16 +00003076if test "$prefix" != "/"; then
3077 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3078fi
3079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081
3082
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003083# We don't use PACKAGE_ variables, and they cause conflicts
3084# with other autoconf-based packages that include Python.h
3085grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3086rm confdefs.h
3087mv confdefs.h.new confdefs.h
3088
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003089
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003090VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003091
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003092# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003093
3094SOVERSION=1.0
3095
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003096# The later defininition of _XOPEN_SOURCE disables certain features
3097# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003100
3101
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003102# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3103# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3104# them.
3105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003107
3108
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003109# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3110# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3111# them.
3112
Matthias Kloseb9621712010-04-24 17:59:49 +00003113$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003114
3115
Martin v. Löwisd6320502004-08-12 13:45:08 +00003116# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3117# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3118
Matthias Kloseb9621712010-04-24 17:59:49 +00003119$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003120
3121
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3123# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3124# them.
3125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
3128
3129
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003130define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003131
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003132# Arguments passed to configure.
3133
3134CONFIG_ARGS="$ac_configure_args"
3135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3137$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 case $enableval in
3142 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143 # Locate the best usable SDK, see Mac/README.txt for more
3144 # information
3145 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003146 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003147 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3149 if test ! -d "${enableval}"
3150 then
3151 enableval=/
3152 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003153 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 ;;
3155 esac
3156 case $enableval in
3157 no)
3158 UNIVERSALSDK=
3159 enable_universalsdk=
3160 ;;
3161 *)
3162 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003163 if test ! -d "${UNIVERSALSDK}"
3164 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003165 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167 ;;
3168 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171else
3172
3173 UNIVERSALSDK=
3174 enable_universalsdk=
3175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003178if test -n "${UNIVERSALSDK}"
3179then
Matthias Kloseb9621712010-04-24 17:59:49 +00003180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3181$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003182else
Matthias Kloseb9621712010-04-24 17:59:49 +00003183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3184$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003188
Ned Deily87adb6e2013-10-18 21:09:56 -07003189ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003190
Ned Deilycbfb9a52012-06-23 16:02:19 -07003191# For backward compatibility reasons we prefer to select '32-bit' if available,
3192# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003193UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003194if test "`uname -s`" = "Darwin"
3195then
3196 if test -n "${UNIVERSALSDK}"
3197 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003198 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003199 then
3200 UNIVERSAL_ARCHS="intel"
3201 fi
3202 fi
3203fi
3204
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003205
Matthias Kloseb9621712010-04-24 17:59:49 +00003206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3207$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003208
3209# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003210if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212 UNIVERSAL_ARCHS="$withval"
3213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214fi
3215
Ned Deily87adb6e2013-10-18 21:09:56 -07003216if test -n "${UNIVERSALSDK}"
3217then
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3219$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3220else
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3222$as_echo "no" >&6; }
3223fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
3226# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003227if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 withval=$with_framework_name;
3229 PYTHONFRAMEWORK=${withval}
3230 PYTHONFRAMEWORKDIR=${withval}.framework
3231 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3232
3233else
3234
3235 PYTHONFRAMEWORK=Python
3236 PYTHONFRAMEWORKDIR=Python.framework
3237 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3238
3239fi
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003242if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003244 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003246 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003247 esac
3248 case $enableval in
3249 no)
3250 PYTHONFRAMEWORK=
3251 PYTHONFRAMEWORKDIR=no-framework
3252 PYTHONFRAMEWORKPREFIX=
3253 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254 FRAMEWORKINSTALLFIRST=
3255 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003256 FRAMEWORKALTINSTALLFIRST=
3257 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003258 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 if test "x${prefix}" = "xNONE"; then
3260 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3261 else
3262 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3263 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003265 ;;
3266 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003268 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003270 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003271 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3272 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003273 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003274 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003275
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003276 if test "x${prefix}" = "xNONE" ; then
3277 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279 else
3280 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3281 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003282
3283 case "${enableval}" in
3284 /System*)
3285 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3286 if test "${prefix}" = "NONE" ; then
3287 # See below
3288 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3289 fi
3290 ;;
3291
3292 /Library*)
3293 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3294 ;;
3295
3296 */Library/Frameworks)
3297 MDIR="`dirname "${enableval}"`"
3298 MDIR="`dirname "${MDIR}"`"
3299 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3300
3301 if test "${prefix}" = "NONE"; then
3302 # User hasn't specified the
3303 # --prefix option, but wants to install
3304 # the framework in a non-default location,
3305 # ensure that the compatibility links get
3306 # installed relative to that prefix as well
3307 # instead of in /usr/local.
3308 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3309 fi
3310 ;;
3311
3312 *)
3313 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3314 ;;
3315 esac
3316
Jack Jansen127e56e2001-09-11 14:41:54 +00003317 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003318
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003319 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003320 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003325 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3326
3327 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3328
Jack Jansene578a632001-08-15 01:27:14 +00003329 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003330
Guido van Rossum563e7081996-09-10 18:20:48 +00003331else
Martin v. Löwis11437992002-04-12 09:54:03 +00003332
Jack Jansene578a632001-08-15 01:27:14 +00003333 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003334 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003335 PYTHONFRAMEWORKPREFIX=
3336 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003337 FRAMEWORKINSTALLFIRST=
3338 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003339 FRAMEWORKALTINSTALLFIRST=
3340 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003341 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003342 if test "x${prefix}" = "xNONE" ; then
3343 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3344 else
3345 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3346 fi
Jack Jansene578a632001-08-15 01:27:14 +00003347 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003350fi
3351
Thomas Wouters477c8d52006-05-27 19:21:47 +00003352
3353
Michael W. Hudson54241132001-12-07 15:38:26 +00003354
3355
3356
3357
Jack Jansene578a632001-08-15 01:27:14 +00003358
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003359
3360
3361
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003362
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003363
Ned Deilyb8f944f2013-11-21 22:42:25 -08003364
Jack Jansene578a632001-08-15 01:27:14 +00003365##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003366## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003367## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003368##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003369# Set name for machine-dependent library files
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3372$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003373if test -z "$MACHDEP"
3374then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003375 # avoid using uname for cross builds
3376 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003377 # ac_sys_system and ac_sys_release are used for setting
3378 # a lot of different things including 'define_xopen_source'
3379 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003380 case "$host" in
3381 *-*-linux*)
3382 ac_sys_system=Linux
3383 ;;
3384 *-*-cygwin*)
3385 ac_sys_system=Cygwin
3386 ;;
3387 *)
3388 # for now, limit cross builds to known configurations
3389 MACHDEP="unknown"
3390 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3391 esac
3392 ac_sys_release=
3393 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003394 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003395 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003396 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003397 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003398 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003399 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003401 fi
3402 ac_md_system=`echo $ac_sys_system |
3403 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3404 ac_md_release=`echo $ac_sys_release |
3405 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3406 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003407
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003408 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003409 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003410 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003411 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003412 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003413 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003414 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003415fi
Guido van Rossum91922671997-10-09 20:24:13 +00003416
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003417
3418if test "$cross_compiling" = yes; then
3419 case "$host" in
3420 *-*-linux*)
3421 case "$host_cpu" in
3422 arm*)
3423 _host_cpu=arm
3424 ;;
3425 *)
3426 _host_cpu=$host_cpu
3427 esac
3428 ;;
3429 *-*-cygwin*)
3430 _host_cpu=
3431 ;;
3432 *)
3433 # for now, limit cross builds to known configurations
3434 MACHDEP="unknown"
3435 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3436 esac
3437 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3438fi
3439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3441# disable features if it is defined, without any means to access these
3442# features as extensions. For these systems, we skip the definition of
3443# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3444# some feature, make sure there is no alternative way to access this
3445# feature. Also, when using wildcards, make sure you have verified the
3446# need for not defining _XOPEN_SOURCE on all systems matching the
3447# wildcard, and that the wildcard does not include future systems
3448# (which may remove their limitations).
3449case $ac_sys_system/$ac_sys_release in
3450 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3451 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003452 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003453 # In addition, Stefan Krah confirms that issue #1244610 exists through
3454 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003455 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003456 define_xopen_source=no
3457 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3458 # also defined. This can be overridden by defining _BSD_SOURCE
3459 # As this has a different meaning on Linux, only define it on OpenBSD
3460
Matthias Kloseb9621712010-04-24 17:59:49 +00003461$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003462
3463 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003464 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003465 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3466 # also defined. This can be overridden by defining _BSD_SOURCE
3467 # As this has a different meaning on Linux, only define it on OpenBSD
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003470
3471 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003472 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3473 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3474 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003475 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 +00003476 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003477 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3478 # request to enable features supported by the standard as a request
3479 # to disable features not supported by the standard. The best way
3480 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3481 # entirely and define __EXTENSIONS__ instead.
3482 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003483 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003484 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3485 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003486 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003487 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003488 define_xopen_source=no;;
3489 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003490 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003491 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003492 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003493 # On FreeBSD 4, the math functions C89 does not cover are never defined
3494 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3495 FreeBSD/4.*)
3496 define_xopen_source=no;;
3497 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3498 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3499 # identifies itself as Darwin/7.*
3500 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3501 # disables platform specific features beyond repair.
3502 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3503 # has no effect, don't bother defining them
3504 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003505 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003506 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003507 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003508 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3509 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3510 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003511 AIX/4)
3512 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003513 AIX/5)
3514 if test `uname -r` -eq 1; then
3515 define_xopen_source=no
3516 fi
3517 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003518 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3519 # defining NI_NUMERICHOST.
3520 QNX/6.3.2)
3521 define_xopen_source=no
3522 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003523
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003524esac
3525
3526if test $define_xopen_source = yes
3527then
Victor Stinner14d098d2011-09-07 22:29:43 +02003528 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003529
Victor Stinner14d098d2011-09-07 22:29:43 +02003530$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003531
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003532
3533 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3534 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3535 # several APIs are not declared. Since this is also needed in some
3536 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003537
Matthias Kloseb9621712010-04-24 17:59:49 +00003538$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003539
3540
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003541
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003542$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003543
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003544fi
3545
Christian Heimes647cd872013-12-07 23:39:33 +01003546# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3547case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003548 hp*|HP*)
3549 define_stdc_a1=yes;;
3550 *)
3551 define_stdc_a1=no;;
3552esac
3553
3554if test $define_stdc_a1 = yes
3555then
Christian Heimes647cd872013-12-07 23:39:33 +01003556
3557$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3558
Christian Heimesb02bcae2013-12-08 15:21:08 +01003559fi
Christian Heimes647cd872013-12-07 23:39:33 +01003560
Guido van Rossum91922671997-10-09 20:24:13 +00003561#
3562# SGI compilers allow the specification of the both the ABI and the
3563# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003564# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003565#
3566# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3567# thus supply support for various ABI/ISA combinations. The MACHDEP
3568# variable is also adjusted.
3569#
3570
3571if test ! -z "$SGI_ABI"
3572then
3573 CC="cc $SGI_ABI"
3574 LDFLAGS="$SGI_ABI $LDFLAGS"
3575 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3578$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003579
Jack Jansen6b08a402004-06-03 12:41:45 +00003580# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3581# it may influence the way we can build extensions, so distutils
3582# needs to check it
3583
Thomas Wouters477c8d52006-05-27 19:21:47 +00003584
Jack Jansen6b08a402004-06-03 12:41:45 +00003585CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003586EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003587
Guido van Rossum627b2d71993-12-24 10:39:16 +00003588# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589
3590# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3591# for debug/optimization stuff. BASECFLAGS is for flags that are required
3592# just to get things to compile and link. Users are free to override OPT
3593# when running configure or make. The build should not break if they do.
3594# BASECFLAGS should generally not be messed with, however.
3595
3596# XXX shouldn't some/most/all of this code be merged with the stuff later
3597# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3599$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003602if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003604 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003605 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003606 without_gcc=yes;;
3607 yes) CC=gcc
3608 without_gcc=no;;
3609 *) CC=$withval
3610 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003611 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003612else
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003614 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003615 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003616 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003617 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003618 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619fi
3620
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3622$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Zachary Ware5af85642015-12-21 12:09:17 -06003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3625$as_echo_n "checking for --with-icc... " >&6; }
3626
3627# Check whether --with-icc was given.
3628if test "${with_icc+set}" = set; then :
3629 withval=$with_icc;
3630 case $withval in
3631 no) CC=${CC:-cc}
3632 with_icc=no;;
3633 yes) CC=icc
3634 CXX=icpc
3635 with_icc=yes;;
3636 *) CC=$withval
3637 with_icc=$withval;;
3638 esac
3639else
3640
3641 with_icc=no
3642fi
3643
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3645$as_echo "$with_icc" >&6; }
3646
Guido van Rossum8b131c51995-03-09 14:10:13 +00003647# If the user switches compilers, we can't believe the cache
3648if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3649then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003650 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003651(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003652fi
3653
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003654# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3655# when the compiler supports them, but we don't always want -O2, and
3656# we set -g later.
3657if test -z "$CFLAGS"; then
3658 CFLAGS=
3659fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003660
3661if test "$ac_sys_system" = "Darwin"
3662then
3663 # Compiler selection on MacOSX is more complicated than
3664 # AC_PROG_CC can handle, see Mac/README.txt for more
3665 # information
3666 if test -z "${CC}"
3667 then
3668 found_gcc=
3669 found_clang=
3670 as_save_IFS=$IFS; IFS=:
3671 for as_dir in $PATH
3672 do
3673 IFS=$as_save_IFS
3674 if test -x $as_dir/gcc; then
3675 if test -z "${found_gcc}"; then
3676 found_gcc=$as_dir/gcc
3677 fi
3678 fi
3679 if test -x $as_dir/clang; then
3680 if test -z "${found_clang}"; then
3681 found_clang=$as_dir/clang
3682 fi
3683 fi
3684 done
3685 IFS=$as_save_IFS
3686
3687 if test -n "$found_gcc" -a -n "$found_clang"
3688 then
3689 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3690 then
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3692$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3693 CC="$found_clang"
3694 CXX="$found_clang++"
3695 fi
3696
3697
3698 elif test -z "$found_gcc" -a -n "$found_clang"
3699 then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3701$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3702 CC="$found_clang"
3703 CXX="$found_clang++"
3704
3705 elif test -z "$found_gcc" -a -z "$found_clang"
3706 then
3707 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3708 if test -n "${found_clang}"
3709 then
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3711$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3712 CC="${found_clang}"
3713 CXX="`/usr/bin/xcrun -find clang++`"
3714
3715 # else: use default behaviour
3716 fi
3717 fi
3718 fi
3719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720ac_ext=c
3721ac_cpp='$CPP $CPPFLAGS'
3722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3724ac_compiler_gnu=$ac_cv_c_compiler_gnu
3725if test -n "$ac_tool_prefix"; then
3726 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3727set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Jack Jansendd19cf82001-12-06 22:36:17 +00003751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$ac_cv_prog_CC"; then
3765 ac_ct_CC=$CC
3766 # Extract the first word of "gcc", so it can be a program name with args.
3767set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003770if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003772else
3773 if test -n "$ac_ct_CC"; then
3774 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3775else
3776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777for as_dir in $PATH
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $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 +00003785 break 2
3786 fi
3787done
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791fi
3792fi
3793ac_ct_CC=$ac_cv_prog_ac_ct_CC
3794if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3796$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 if test "x$ac_ct_CC" = x; then
3803 CC=""
3804 else
3805 case $cross_compiling:$ac_tool_warned in
3806yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809ac_tool_warned=yes ;;
3810esac
3811 CC=$ac_ct_CC
3812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
3814 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Jack Jansendd19cf82001-12-06 22:36:17 +00003817if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 if test -n "$ac_tool_prefix"; then
3819 # 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 +00003820set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003825else
3826 if test -n "$CC"; then
3827 ac_cv_prog_CC="$CC" # Let the user override the test.
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $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 +00003838 break 2
3839 fi
3840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844fi
3845fi
3846CC=$ac_cv_prog_CC
3847if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858if test -z "$CC"; then
3859 # Extract the first word of "cc", so it can be a program name with args.
3860set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$CC"; then
3867 ac_cv_prog_CC="$CC" # Let the user override the test.
3868else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003869 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH
3872do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3878 ac_prog_rejected=yes
3879 continue
3880 fi
3881 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 $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 +00003883 break 2
3884 fi
3885done
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003889if test $ac_prog_rejected = yes; then
3890 # We found a bogon in the path, so make sure we never use it.
3891 set dummy $ac_cv_prog_CC
3892 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894 # We chose a different compiler from the bogus one.
3895 # However, it has the same basename, so the bogon will be chosen
3896 # first if we set CC to just the basename; use the full file name.
3897 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003898 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899 fi
3900fi
3901fi
3902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003904if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3906$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003907else
Matthias Kloseb9621712010-04-24 17:59:49 +00003908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3909$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003910fi
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913fi
3914if test -z "$CC"; then
3915 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 do
3918 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3921$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003922if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924else
3925 if test -n "$CC"; then
3926 ac_cv_prog_CC="$CC" # Let the user override the test.
3927else
Martin v. Löwis11437992002-04-12 09:54:03 +00003928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931 IFS=$as_save_IFS
3932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 $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 +00003937 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003939done
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003942
3943fi
3944fi
3945CC=$ac_cv_prog_CC
3946if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3948$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003949else
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003952fi
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 test -n "$CC" && break
3956 done
3957fi
3958if test -z "$CC"; then
3959 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003961do
3962 # Extract the first word of "$ac_prog", so it can be a program name with args.
3963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3965$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003966if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003968else
3969 if test -n "$ac_ct_CC"; then
3970 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3971else
3972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH
3974do
3975 IFS=$as_save_IFS
3976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $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 +00003981 break 2
3982 fi
3983done
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987fi
3988fi
3989ac_ct_CC=$ac_cv_prog_ac_ct_CC
3990if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3992$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003993else
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003996fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 test -n "$ac_ct_CC" && break
4000done
Michael W. Hudson54241132001-12-07 15:38:26 +00004001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 if test "x$ac_ct_CC" = x; then
4003 CC=""
4004 else
4005 case $cross_compiling:$ac_tool_warned in
4006yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009ac_tool_warned=yes ;;
4010esac
4011 CC=$ac_ct_CC
4012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004013fi
4014
4015fi
4016
4017
Matthias Kloseb9621712010-04-24 17:59:49 +00004018test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004022
4023# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004024$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4025set X $ac_compile
4026ac_compiler=$2
4027for ac_option in --version -v -V -qversion; do
4028 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004029case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034$as_echo "$ac_try_echo"; } >&5
4035 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 if test -s conftest.err; then
4038 sed '10a\
4039... rest of stderr output deleted ...
4040 10q' conftest.err >conftest.er1
4041 cat conftest.er1 >&5
4042 fi
4043 rm -f conftest.er1 conftest.err
4044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }
4046done
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
Matthias Kloseb9621712010-04-24 17:59:49 +00004048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004049/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004050
Martin v. Löwis11437992002-04-12 09:54:03 +00004051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004060ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004061# Try to create an executable without -o first, disregard a.out.
4062# It will help us diagnose broken compilers, and finding out an intuition
4063# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4065$as_echo_n "checking whether the C compiler works... " >&6; }
4066ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4067
4068# The possible output files:
4069ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071ac_rmfiles=
4072for ac_file in $ac_files
4073do
4074 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4077 esac
4078done
4079rm -f $ac_rmfiles
4080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4093# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4094# in a Makefile. We should not override ac_cv_exeext if it was cached,
4095# so that the user can short-circuit this test for compilers unknown to
4096# Autoconf.
4097for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004098do
4099 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004102 ;;
4103 [ab].out )
4104 # We found the default executable, but exeext='' is most
4105 # certainly right.
4106 break;;
4107 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 then :; else
4110 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4111 fi
4112 # We set ac_cv_exeext here because the later test for it is not
4113 # safe: cross compilers may not add the suffix if given an `-o'
4114 # argument, so we may need to know it at that point already.
4115 # Even if this section looks crufty: it has the advantage of
4116 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117 break;;
4118 * )
4119 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 esac
4121done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122test "$ac_cv_exeext" = no && ac_cv_exeext=
4123
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004124else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 ac_file=''
4126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if test -z "$ac_file"; then :
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
4130$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004131sed 's/^/| /' conftest.$ac_ext >&5
4132
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004136See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004137else
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4139$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4142$as_echo_n "checking for C compiler default output file name... " >&6; }
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4144$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146
Matthias Kloseb9621712010-04-24 17:59:49 +00004147rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004148ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4150$as_echo_n "checking for suffix of executables... " >&6; }
4151if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4163# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4164# work properly (i.e., refer to `conftest.exe'), while it won't with
4165# `rm'.
4166for ac_file in conftest.exe conftest conftest.*; do
4167 test -f "$ac_file" || continue
4168 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004170 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4171 break;;
4172 * ) break;;
4173 esac
4174done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004178as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004179See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181rm -f conftest conftest$ac_cv_exeext
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4183$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004184
4185rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186EXEEXT=$ac_cv_exeext
4187ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189/* end confdefs.h. */
4190#include <stdio.h>
4191int
4192main ()
4193{
4194FILE *f = fopen ("conftest.out", "w");
4195 return ferror (f) || fclose (f) != 0;
4196
4197 ;
4198 return 0;
4199}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201ac_clean_files="$ac_clean_files conftest.out"
4202# Check that the compiler produces executables we can run. If not, either
4203# the compiler is broken, or we cross compile.
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4205$as_echo_n "checking whether we are cross compiling... " >&6; }
4206if test "$cross_compiling" != yes; then
4207 { { ac_try="$ac_link"
4208case "(($ac_try" in
4209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210 *) ac_try_echo=$ac_try;;
4211esac
4212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4213$as_echo "$ac_try_echo"; } >&5
4214 (eval "$ac_link") 2>&5
4215 ac_status=$?
4216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4217 test $ac_status = 0; }
4218 if { ac_try='./conftest$ac_cv_exeext'
4219 { { case "(($ac_try" in
4220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221 *) ac_try_echo=$ac_try;;
4222esac
4223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4224$as_echo "$ac_try_echo"; } >&5
4225 (eval "$ac_try") 2>&5
4226 ac_status=$?
4227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4228 test $ac_status = 0; }; }; then
4229 cross_compiling=no
4230 else
4231 if test "$cross_compiling" = maybe; then
4232 cross_compiling=yes
4233 else
4234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004236as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004238See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 fi
4240 fi
4241fi
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4243$as_echo "$cross_compiling" >&6; }
4244
4245rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4246ac_clean_files=$ac_clean_files_save
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4248$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
4251else
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4270$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4274 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 for ac_file in conftest.o conftest.obj conftest.*; do
4276 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4280 break;;
4281 esac
4282done
4283else
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004285sed 's/^/| /' conftest.$ac_ext >&5
4286
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004289as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004290See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004291fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004292rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4295$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296OBJEXT=$ac_cv_objext
4297ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4299$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004300if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004302else
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306int
4307main ()
4308{
4309#ifndef __GNUC__
4310 choke me
4311#endif
4312
4313 ;
4314 return 0;
4315}
4316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 ac_compiler_gnu=yes
4319else
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004323ac_cv_c_compiler_gnu=$ac_compiler_gnu
4324
4325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4327$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4328if test $ac_compiler_gnu = yes; then
4329 GCC=yes
4330else
4331 GCC=
4332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004333ac_test_CFLAGS=${CFLAGS+set}
4334ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4336$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004337if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004339else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_save_c_werror_flag=$ac_c_werror_flag
4341 ac_c_werror_flag=yes
4342 ac_cv_prog_cc_g=no
4343 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
Martin v. Löwis11437992002-04-12 09:54:03 +00004347int
4348main ()
4349{
4350
4351 ;
4352 return 0;
4353}
4354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004356 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357else
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 CFLAGS=""
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360/* end confdefs.h. */
4361
4362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372else
4373 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376/* end confdefs.h. */
4377
4378int
4379main ()
4380{
4381
4382 ;
4383 return 0;
4384}
4385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4394 ac_c_werror_flag=$ac_save_c_werror_flag
4395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4397$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004398if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004400elif test $ac_cv_prog_cc_g = yes; then
4401 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004402 CFLAGS="-g -O2"
4403 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004404 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405 fi
4406else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004407 if test "$GCC" = yes; then
4408 CFLAGS="-O2"
4409 else
4410 CFLAGS=
4411 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4414$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004415if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004417else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004419ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004421/* end confdefs.h. */
4422#include <stdarg.h>
4423#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004424struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004425/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4426struct buf { int x; };
4427FILE * (*rcsopen) (struct buf *, struct stat *, int);
4428static char *e (p, i)
4429 char **p;
4430 int i;
4431{
4432 return p[i];
4433}
4434static char *f (char * (*g) (char **, int), char **p, ...)
4435{
4436 char *s;
4437 va_list v;
4438 va_start (v,p);
4439 s = g (p, va_arg (v,int));
4440 va_end (v);
4441 return s;
4442}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443
4444/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4445 function prototypes and stuff, but not '\xHH' hex character constants.
4446 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004448 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4449 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004451int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4454 inside strings and character constants. */
4455#define FOO(x) 'x'
4456int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4457
Skip Montanaro6dead952003-09-25 14:50:04 +00004458int test (int i, double x);
4459struct s1 {int (*f) (int a);};
4460struct s2 {int (*f) (double a);};
4461int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4462int argc;
4463char **argv;
4464int
4465main ()
4466{
4467return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4468 ;
4469 return 0;
4470}
4471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4473 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004474do
4475 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004477 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479rm -f core conftest.err conftest.$ac_objext
4480 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004481done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004483CC=$ac_save_CC
4484
4485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486# AC_CACHE_VAL
4487case "x$ac_cv_prog_cc_c89" in
4488 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4490$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4493$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004494 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4497$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004498esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004499if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004500
Matthias Kloseb9621712010-04-24 17:59:49 +00004501fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503ac_ext=c
4504ac_cpp='$CPP $CPPFLAGS'
4505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4515$as_echo_n "checking how to run the C preprocessor... " >&6; }
4516# On Suns, sometimes $CPP names a directory.
4517if test -n "$CPP" && test -d "$CPP"; then
4518 CPP=
4519fi
4520if test -z "$CPP"; then
4521 if ${ac_cv_prog_CPP+:} false; then :
4522 $as_echo_n "(cached) " >&6
4523else
4524 # Double quotes because CPP needs to be expanded
4525 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4526 do
4527 ac_preproc_ok=false
4528for ac_c_preproc_warn_flag in '' yes
4529do
4530 # Use a header file that comes with gcc, so configuring glibc
4531 # with a fresh cross-compiler works.
4532 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4533 # <limits.h> exists even on freestanding compilers.
4534 # On the NeXT, cc -E runs the code through the compiler's parser,
4535 # not just through cpp. "Syntax error" is here to catch this case.
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#ifdef __STDC__
4539# include <limits.h>
4540#else
4541# include <assert.h>
4542#endif
4543 Syntax error
4544_ACEOF
4545if ac_fn_c_try_cpp "$LINENO"; then :
4546
4547else
4548 # Broken: fails on valid input.
4549continue
4550fi
4551rm -f conftest.err conftest.i conftest.$ac_ext
4552
4553 # OK, works on sane cases. Now check whether nonexistent headers
4554 # can be detected and how.
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4556/* end confdefs.h. */
4557#include <ac_nonexistent.h>
4558_ACEOF
4559if ac_fn_c_try_cpp "$LINENO"; then :
4560 # Broken: success on invalid input.
4561continue
4562else
4563 # Passes both tests.
4564ac_preproc_ok=:
4565break
4566fi
4567rm -f conftest.err conftest.i conftest.$ac_ext
4568
4569done
4570# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4571rm -f conftest.i conftest.err conftest.$ac_ext
4572if $ac_preproc_ok; then :
4573 break
4574fi
4575
4576 done
4577 ac_cv_prog_CPP=$CPP
4578
4579fi
4580 CPP=$ac_cv_prog_CPP
4581else
4582 ac_cv_prog_CPP=$CPP
4583fi
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4585$as_echo "$CPP" >&6; }
4586ac_preproc_ok=false
4587for ac_c_preproc_warn_flag in '' yes
4588do
4589 # Use a header file that comes with gcc, so configuring glibc
4590 # with a fresh cross-compiler works.
4591 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4592 # <limits.h> exists even on freestanding compilers.
4593 # On the NeXT, cc -E runs the code through the compiler's parser,
4594 # not just through cpp. "Syntax error" is here to catch this case.
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#ifdef __STDC__
4598# include <limits.h>
4599#else
4600# include <assert.h>
4601#endif
4602 Syntax error
4603_ACEOF
4604if ac_fn_c_try_cpp "$LINENO"; then :
4605
4606else
4607 # Broken: fails on valid input.
4608continue
4609fi
4610rm -f conftest.err conftest.i conftest.$ac_ext
4611
4612 # OK, works on sane cases. Now check whether nonexistent headers
4613 # can be detected and how.
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616#include <ac_nonexistent.h>
4617_ACEOF
4618if ac_fn_c_try_cpp "$LINENO"; then :
4619 # Broken: success on invalid input.
4620continue
4621else
4622 # Passes both tests.
4623ac_preproc_ok=:
4624break
4625fi
4626rm -f conftest.err conftest.i conftest.$ac_ext
4627
4628done
4629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4630rm -f conftest.i conftest.err conftest.$ac_ext
4631if $ac_preproc_ok; then :
4632
4633else
4634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4636as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4637See \`config.log' for more details" "$LINENO" 5; }
4638fi
4639
4640ac_ext=c
4641ac_cpp='$CPP $CPPFLAGS'
4642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4644ac_compiler_gnu=$ac_cv_c_compiler_gnu
4645
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4647$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4648if ${ac_cv_path_GREP+:} false; then :
4649 $as_echo_n "(cached) " >&6
4650else
4651 if test -z "$GREP"; then
4652 ac_path_GREP_found=false
4653 # Loop through the user's path and test for each of PROGNAME-LIST
4654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_prog in grep ggrep; do
4660 for ac_exec_ext in '' $ac_executable_extensions; do
4661 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4662 as_fn_executable_p "$ac_path_GREP" || continue
4663# Check for GNU ac_path_GREP and select it if it is found.
4664 # Check for GNU $ac_path_GREP
4665case `"$ac_path_GREP" --version 2>&1` in
4666*GNU*)
4667 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4668*)
4669 ac_count=0
4670 $as_echo_n 0123456789 >"conftest.in"
4671 while :
4672 do
4673 cat "conftest.in" "conftest.in" >"conftest.tmp"
4674 mv "conftest.tmp" "conftest.in"
4675 cp "conftest.in" "conftest.nl"
4676 $as_echo 'GREP' >> "conftest.nl"
4677 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4678 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4679 as_fn_arith $ac_count + 1 && ac_count=$as_val
4680 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4681 # Best one so far, save it but keep looking for a better one
4682 ac_cv_path_GREP="$ac_path_GREP"
4683 ac_path_GREP_max=$ac_count
4684 fi
4685 # 10*(2^10) chars as input seems more than enough
4686 test $ac_count -gt 10 && break
4687 done
4688 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4689esac
4690
4691 $ac_path_GREP_found && break 3
4692 done
4693 done
4694 done
4695IFS=$as_save_IFS
4696 if test -z "$ac_cv_path_GREP"; then
4697 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4698 fi
4699else
4700 ac_cv_path_GREP=$GREP
4701fi
4702
4703fi
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4705$as_echo "$ac_cv_path_GREP" >&6; }
4706 GREP="$ac_cv_path_GREP"
4707
4708
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004709
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711
Matthias Kloseb9621712010-04-24 17:59:49 +00004712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4713$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004715# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004716if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004717 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718
4719 case $withval in
4720 no) with_cxx_main=no
4721 MAINCC='$(CC)';;
4722 yes) with_cxx_main=yes
4723 MAINCC='$(CXX)';;
4724 *) with_cxx_main=yes
4725 MAINCC=$withval
4726 if test -z "$CXX"
4727 then
4728 CXX=$withval
4729 fi;;
4730 esac
4731else
4732
4733 with_cxx_main=no
4734 MAINCC='$(CC)'
4735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004736fi
4737
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4739$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
4741preset_cxx="$CXX"
4742if test -z "$CXX"
4743then
4744 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 gcc) if test -n "$ac_tool_prefix"; then
4746 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4747set dummy ${ac_tool_prefix}g++; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_path_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 case $CXX in
4754 [\\/]* | ?:[\\/]*)
4755 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4756 ;;
4757 *)
4758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4759for as_dir in notfound
4760do
4761 IFS=$as_save_IFS
4762 test -z "$as_dir" && as_dir=.
4763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4767 break 2
4768 fi
4769done
4770 done
4771IFS=$as_save_IFS
4772
4773 ;;
4774esac
4775fi
4776CXX=$ac_cv_path_CXX
4777if test -n "$CXX"; then
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4779$as_echo "$CXX" >&6; }
4780else
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784
4785
4786fi
4787if test -z "$ac_cv_path_CXX"; then
4788 ac_pt_CXX=$CXX
4789 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793if ${ac_cv_path_ac_pt_CXX+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795else
4796 case $ac_pt_CXX in
4797 [\\/]* | ?:[\\/]*)
4798 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4799 ;;
4800 *)
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in notfound
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
4812done
4813 done
4814IFS=$as_save_IFS
4815
4816 ;;
4817esac
4818fi
4819ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4820if test -n "$ac_pt_CXX"; then
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4822$as_echo "$ac_pt_CXX" >&6; }
4823else
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
4826fi
4827
4828 if test "x$ac_pt_CXX" = x; then
4829 CXX="g++"
4830 else
4831 case $cross_compiling:$ac_tool_warned in
4832yes:)
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4835ac_tool_warned=yes ;;
4836esac
4837 CXX=$ac_pt_CXX
4838 fi
4839else
4840 CXX="$ac_cv_path_CXX"
4841fi
4842 ;;
4843 cc) if test -n "$ac_tool_prefix"; then
4844 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4845set dummy ${ac_tool_prefix}c++; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004848if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850else
4851 case $CXX in
4852 [\\/]* | ?:[\\/]*)
4853 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4854 ;;
4855 *)
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in notfound
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865 break 2
4866 fi
4867done
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004869IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004871 ;;
4872esac
4873fi
4874CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004875if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4877$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004878else
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004882
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883
4884fi
4885if test -z "$ac_cv_path_CXX"; then
4886 ac_pt_CXX=$CXX
4887 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004888set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004895 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004896 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 +00004897 ;;
4898 *)
4899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in notfound
4901do
4902 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004904 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004908 break 2
4909 fi
4910done
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004912IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004913
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004914 ;;
4915esac
4916fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004917ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4918if test -n "$ac_pt_CXX"; then
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4920$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004921else
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 if test "x$ac_pt_CXX" = x; then
4927 CXX="c++"
4928 else
4929 case $cross_compiling:$ac_tool_warned in
4930yes:)
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4933ac_tool_warned=yes ;;
4934esac
4935 CXX=$ac_pt_CXX
4936 fi
4937else
4938 CXX="$ac_cv_path_CXX"
4939fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004940 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004941 clang|*/clang) if test -n "$ac_tool_prefix"; then
4942 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4943set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
4946if ${ac_cv_path_CXX+:} false; then :
4947 $as_echo_n "(cached) " >&6
4948else
4949 case $CXX in
4950 [\\/]* | ?:[\\/]*)
4951 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4952 ;;
4953 *)
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in notfound
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965done
4966 done
4967IFS=$as_save_IFS
4968
Ned Deilycbfb9a52012-06-23 16:02:19 -07004969 ;;
4970esac
4971fi
4972CXX=$ac_cv_path_CXX
4973if test -n "$CXX"; then
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4975$as_echo "$CXX" >&6; }
4976else
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978$as_echo "no" >&6; }
4979fi
4980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004981
4982fi
4983if test -z "$ac_cv_path_CXX"; then
4984 ac_pt_CXX=$CXX
4985 # Extract the first word of "clang++", so it can be a program name with args.
4986set dummy clang++; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
4989if ${ac_cv_path_ac_pt_CXX+:} false; then :
4990 $as_echo_n "(cached) " >&6
4991else
4992 case $ac_pt_CXX in
4993 [\\/]* | ?:[\\/]*)
4994 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4995 ;;
4996 *)
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in notfound
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
5002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005004 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006 break 2
5007 fi
5008done
5009 done
5010IFS=$as_save_IFS
5011
5012 ;;
5013esac
5014fi
5015ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5016if test -n "$ac_pt_CXX"; then
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5018$as_echo "$ac_pt_CXX" >&6; }
5019else
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
5022fi
5023
5024 if test "x$ac_pt_CXX" = x; then
5025 CXX="clang++"
5026 else
5027 case $cross_compiling:$ac_tool_warned in
5028yes:)
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5031ac_tool_warned=yes ;;
5032esac
5033 CXX=$ac_pt_CXX
5034 fi
5035else
5036 CXX="$ac_cv_path_CXX"
5037fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005038 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005039 icc|*/icc) if test -n "$ac_tool_prefix"; then
5040 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5041set dummy ${ac_tool_prefix}icpc; ac_word=$2
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5043$as_echo_n "checking for $ac_word... " >&6; }
5044if ${ac_cv_path_CXX+:} false; then :
5045 $as_echo_n "(cached) " >&6
5046else
5047 case $CXX in
5048 [\\/]* | ?:[\\/]*)
5049 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5050 ;;
5051 *)
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in notfound
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5059 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5061 break 2
5062 fi
5063done
5064 done
5065IFS=$as_save_IFS
5066
5067 ;;
5068esac
5069fi
5070CXX=$ac_cv_path_CXX
5071if test -n "$CXX"; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
5074else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
5077fi
5078
5079
5080fi
5081if test -z "$ac_cv_path_CXX"; then
5082 ac_pt_CXX=$CXX
5083 # Extract the first word of "icpc", so it can be a program name with args.
5084set dummy icpc; ac_word=$2
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
5087if ${ac_cv_path_ac_pt_CXX+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089else
5090 case $ac_pt_CXX in
5091 [\\/]* | ?:[\\/]*)
5092 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5093 ;;
5094 *)
5095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in notfound
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110 ;;
5111esac
5112fi
5113ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5114if test -n "$ac_pt_CXX"; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5116$as_echo "$ac_pt_CXX" >&6; }
5117else
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
5120fi
5121
5122 if test "x$ac_pt_CXX" = x; then
5123 CXX="icpc"
5124 else
5125 case $cross_compiling:$ac_tool_warned in
5126yes:)
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5129ac_tool_warned=yes ;;
5130esac
5131 CXX=$ac_pt_CXX
5132 fi
5133else
5134 CXX="$ac_cv_path_CXX"
5135fi
5136 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137 esac
5138 if test "$CXX" = "notfound"
5139 then
5140 CXX=""
5141 fi
5142fi
5143if test -z "$CXX"
5144then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 if test -n "$ac_tool_prefix"; then
5146 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5147 do
5148 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5151$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154else
5155 if test -n "$CXX"; then
5156 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5157else
5158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005165 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167 break 2
5168 fi
5169done
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005171IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173fi
5174fi
5175CXX=$ac_cv_prog_CXX
5176if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5178$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179else
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005184
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005185 test -n "$CXX" && break
5186 done
5187fi
5188if test -z "$CXX"; then
5189 ac_ct_CXX=$CXX
5190 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5191do
5192 # Extract the first word of "$ac_prog", so it can be a program name with args.
5193set dummy $ac_prog; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5197 $as_echo_n "(cached) " >&6
5198else
5199 if test -n "$ac_ct_CXX"; then
5200 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5201else
5202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5203for as_dir in $PATH
5204do
5205 IFS=$as_save_IFS
5206 test -z "$as_dir" && as_dir=.
5207 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005209 ac_cv_prog_ac_ct_CXX="$ac_prog"
5210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5211 break 2
5212 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005213done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005214 done
5215IFS=$as_save_IFS
5216
5217fi
5218fi
5219ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5220if test -n "$ac_ct_CXX"; then
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5222$as_echo "$ac_ct_CXX" >&6; }
5223else
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5225$as_echo "no" >&6; }
5226fi
5227
5228
5229 test -n "$ac_ct_CXX" && break
5230done
5231
5232 if test "x$ac_ct_CXX" = x; then
5233 CXX="notfound"
5234 else
5235 case $cross_compiling:$ac_tool_warned in
5236yes:)
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5239ac_tool_warned=yes ;;
5240esac
5241 CXX=$ac_ct_CXX
5242 fi
5243fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005244
5245 if test "$CXX" = "notfound"
5246 then
5247 CXX=""
5248 fi
5249fi
5250if test "$preset_cxx" != "$CXX"
5251then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005252 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005253
5254 By default, distutils will build C++ extension modules with \"$CXX\".
5255 If this is not intended, then set CXX on the configure command line.
5256 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005257$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005258
5259 By default, distutils will build C++ extension modules with \"$CXX\".
5260 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005261 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005262fi
5263
5264
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5266
5267
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5269$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5270cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005271#undef bfin
5272#undef cris
5273#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005275#undef hppa
5276#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005278#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005279#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005280#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005281#undef unix
5282#if defined(__linux__)
5283# if defined(__x86_64__) && defined(__LP64__)
5284 x86_64-linux-gnu
5285# elif defined(__x86_64__) && defined(__ILP32__)
5286 x86_64-linux-gnux32
5287# elif defined(__i386__)
5288 i386-linux-gnu
5289# elif defined(__aarch64__) && defined(__AARCH64EL__)
5290# if defined(__ILP32__)
5291 aarch64_ilp32-linux-gnu
5292# else
5293 aarch64-linux-gnu
5294# endif
5295# elif defined(__aarch64__) && defined(__AARCH64EB__)
5296# if defined(__ILP32__)
5297 aarch64_be_ilp32-linux-gnu
5298# else
5299 aarch64_be-linux-gnu
5300# endif
5301# elif defined(__alpha__)
5302 alpha-linux-gnu
5303# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5304# if defined(__ARMEL__)
5305 arm-linux-gnueabihf
5306# else
5307 armeb-linux-gnueabihf
5308# endif
5309# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5310# if defined(__ARMEL__)
5311 arm-linux-gnueabi
5312# else
5313 armeb-linux-gnueabi
5314# endif
5315# elif defined(__hppa__)
5316 hppa-linux-gnu
5317# elif defined(__ia64__)
5318 ia64-linux-gnu
5319# elif defined(__m68k__) && !defined(__mcoldfire__)
5320 m68k-linux-gnu
5321# elif defined(__mips_hard_float) && defined(_MIPSEL)
5322# if _MIPS_SIM == _ABIO32
5323 mipsel-linux-gnu
5324# elif _MIPS_SIM == _ABIN32
5325 mips64el-linux-gnuabin32
5326# elif _MIPS_SIM == _ABI64
5327 mips64el-linux-gnuabi64
5328# else
5329# error unknown platform triplet
5330# endif
5331# elif defined(__mips_hard_float)
5332# if _MIPS_SIM == _ABIO32
5333 mips-linux-gnu
5334# elif _MIPS_SIM == _ABIN32
5335 mips64-linux-gnuabin32
5336# elif _MIPS_SIM == _ABI64
5337 mips64-linux-gnuabi64
5338# else
5339# error unknown platform triplet
5340# endif
5341# elif defined(__or1k__)
5342 or1k-linux-gnu
5343# elif defined(__powerpc__) && defined(__SPE__)
5344 powerpc-linux-gnuspe
5345# elif defined(__powerpc64__)
5346# if defined(__LITTLE_ENDIAN__)
5347 powerpc64le-linux-gnu
5348# else
5349 powerpc64-linux-gnu
5350# endif
5351# elif defined(__powerpc__)
5352 powerpc-linux-gnu
5353# elif defined(__s390x__)
5354 s390x-linux-gnu
5355# elif defined(__s390__)
5356 s390-linux-gnu
5357# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5358 sh4-linux-gnu
5359# elif defined(__sparc__) && defined(__arch64__)
5360 sparc64-linux-gnu
5361# elif defined(__sparc__)
5362 sparc-linux-gnu
5363# else
5364# error unknown platform triplet
5365# endif
5366#elif defined(__FreeBSD_kernel__)
5367# if defined(__LP64__)
5368 x86_64-kfreebsd-gnu
5369# elif defined(__i386__)
5370 i386-kfreebsd-gnu
5371# else
5372# error unknown platform triplet
5373# endif
5374#elif defined(__gnu_hurd__)
5375 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005376#elif defined(__APPLE__)
5377 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005378#else
5379# error unknown platform triplet
5380#endif
5381
5382EOF
5383
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005384if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005385 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5387$as_echo "$PLATFORM_TRIPLET" >&6; }
5388else
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5390$as_echo "none" >&6; }
5391fi
5392rm -f conftest.c conftest.out
5393
5394if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5395 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5396 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5397 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005398elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5399 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005400fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005401if test x$PLATFORM_TRIPLET = x; then
5402 PLATDIR=plat-$MACHDEP
5403else
5404 PLATDIR=plat-$PLATFORM_TRIPLET
5405fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005406
5407
doko@ubuntu.com55532312016-06-14 08:55:19 +02005408if test x$MULTIARCH != x; then
5409 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5410fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005411
5412
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5414$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5415save_LDFLAGS="$LDFLAGS"
5416LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005417
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5419/* end confdefs.h. */
5420
5421int
5422main ()
5423{
5424
5425 ;
5426 return 0;
5427}
5428_ACEOF
5429if ac_fn_c_try_link "$LINENO"; then :
5430 NO_AS_NEEDED="-Wl,--no-as-needed"
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5432$as_echo "yes" >&6; }
5433else
5434 NO_AS_NEEDED=""
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5436$as_echo "no" >&6; }
5437fi
5438rm -f core conftest.err conftest.$ac_objext \
5439 conftest$ac_exeext conftest.$ac_ext
5440LDFLAGS="$save_LDFLAGS"
5441
5442
5443
5444# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445
Matthias Kloseb9621712010-04-24 17:59:49 +00005446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5447$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005448if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450else
5451 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5452 then ac_cv_path_EGREP="$GREP -E"
5453 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 # Loop through the user's path and test for each of PROGNAME-LIST
5457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5459do
5460 IFS=$as_save_IFS
5461 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 for ac_prog in egrep; do
5463 for ac_exec_ext in '' $ac_executable_extensions; do
5464 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005465 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005466# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 # Check for GNU $ac_path_EGREP
5468case `"$ac_path_EGREP" --version 2>&1` in
5469*GNU*)
5470 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5471*)
5472 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005474 while :
5475 do
5476 cat "conftest.in" "conftest.in" >"conftest.tmp"
5477 mv "conftest.tmp" "conftest.in"
5478 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005480 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5481 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005483 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5484 # Best one so far, save it but keep looking for a better one
5485 ac_cv_path_EGREP="$ac_path_EGREP"
5486 ac_path_EGREP_max=$ac_count
5487 fi
5488 # 10*(2^10) chars as input seems more than enough
5489 test $ac_count -gt 10 && break
5490 done
5491 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5492esac
5493
Matthias Kloseb9621712010-04-24 17:59:49 +00005494 $ac_path_EGREP_found && break 3
5495 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005496 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005498IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005500 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 +00005501 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005502else
5503 ac_cv_path_EGREP=$EGREP
5504fi
5505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005506 fi
5507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5509$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005510 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005511
5512
Matthias Kloseb9621712010-04-24 17:59:49 +00005513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5514$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005515if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005516 $as_echo_n "(cached) " >&6
5517else
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005519/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005520#include <stdlib.h>
5521#include <stdarg.h>
5522#include <string.h>
5523#include <float.h>
5524
5525int
5526main ()
5527{
5528
5529 ;
5530 return 0;
5531}
5532_ACEOF
5533if ac_fn_c_try_compile "$LINENO"; then :
5534 ac_cv_header_stdc=yes
5535else
5536 ac_cv_header_stdc=no
5537fi
5538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5539
5540if test $ac_cv_header_stdc = yes; then
5541 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5543/* end confdefs.h. */
5544#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005545
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005546_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005548 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005550else
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005552fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005553rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554
Matthias Kloseb9621712010-04-24 17:59:49 +00005555fi
5556
5557if test $ac_cv_header_stdc = yes; then
5558 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5560/* end confdefs.h. */
5561#include <stdlib.h>
5562
5563_ACEOF
5564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5565 $EGREP "free" >/dev/null 2>&1; then :
5566
5567else
5568 ac_cv_header_stdc=no
5569fi
5570rm -f conftest*
5571
5572fi
5573
5574if test $ac_cv_header_stdc = yes; then
5575 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5576 if test "$cross_compiling" = yes; then :
5577 :
5578else
5579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5580/* end confdefs.h. */
5581#include <ctype.h>
5582#include <stdlib.h>
5583#if ((' ' & 0x0FF) == 0x020)
5584# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5585# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5586#else
5587# define ISLOWER(c) \
5588 (('a' <= (c) && (c) <= 'i') \
5589 || ('j' <= (c) && (c) <= 'r') \
5590 || ('s' <= (c) && (c) <= 'z'))
5591# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5592#endif
5593
5594#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5595int
5596main ()
5597{
5598 int i;
5599 for (i = 0; i < 256; i++)
5600 if (XOR (islower (i), ISLOWER (i))
5601 || toupper (i) != TOUPPER (i))
5602 return 2;
5603 return 0;
5604}
5605_ACEOF
5606if ac_fn_c_try_run "$LINENO"; then :
5607
5608else
5609 ac_cv_header_stdc=no
5610fi
5611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5612 conftest.$ac_objext conftest.beam conftest.$ac_ext
5613fi
5614
5615fi
5616fi
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5618$as_echo "$ac_cv_header_stdc" >&6; }
5619if test $ac_cv_header_stdc = yes; then
5620
5621$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5622
5623fi
5624
5625# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5626for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5627 inttypes.h stdint.h unistd.h
5628do :
5629 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5630ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5631"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005632if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005633 cat >>confdefs.h <<_ACEOF
5634#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5635_ACEOF
5636
5637fi
5638
5639done
5640
5641
5642
5643 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 +02005644if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 MINIX=yes
5646else
5647 MINIX=
5648fi
5649
5650
5651 if test "$MINIX" = yes; then
5652
5653$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5654
5655
5656$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5657
5658
5659$as_echo "#define _MINIX 1" >>confdefs.h
5660
5661 fi
5662
5663
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5665$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005666if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 $as_echo_n "(cached) " >&6
5668else
5669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5670/* end confdefs.h. */
5671
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005672# define __EXTENSIONS__ 1
5673 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005674int
5675main ()
5676{
5677
5678 ;
5679 return 0;
5680}
5681_ACEOF
5682if ac_fn_c_try_compile "$LINENO"; then :
5683 ac_cv_safe_to_define___extensions__=yes
5684else
5685 ac_cv_safe_to_define___extensions__=no
5686fi
5687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5688fi
5689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5690$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5691 test $ac_cv_safe_to_define___extensions__ = yes &&
5692 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5693
5694 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5695
5696 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5697
5698 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5699
5700 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5701
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
Xavier de Gaye95750b12016-07-09 11:05:42 +02005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5705$as_echo_n "checking for the Android API level... " >&6; }
5706cat >> conftest.c <<EOF
5707#ifdef __ANDROID__
5708#include <android/api-level.h>
5709__ANDROID_API__
5710#else
5711#error not Android
5712#endif
5713EOF
5714
5715if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5716 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5718$as_echo "$ANDROID_API_LEVEL" >&6; }
5719
5720cat >>confdefs.h <<_ACEOF
5721#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5722_ACEOF
5723
5724else
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5726$as_echo "not Android" >&6; }
5727fi
5728rm -f conftest.c conftest.out
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730# Check for unsupported systems
5731case $ac_sys_system/$ac_sys_release in
5732atheos*|Linux*/1*)
5733 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5734 echo See README for details.
5735 exit 1;;
5736esac
5737
5738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5740$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741
5742# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005743if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744 withval=$with_suffix;
5745 case $withval in
5746 no) EXEEXT=;;
5747 yes) EXEEXT=.exe;;
5748 *) EXEEXT=$withval;;
5749 esac
5750fi
5751
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5753$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# Test whether we're running on a non-case-sensitive system, in which
5756# case we give a warning if no ext is given
5757
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5759$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760if test ! -d CaseSensitiveTestDir; then
5761mkdir CaseSensitiveTestDir
5762fi
5763
5764if test -d casesensitivetestdir
5765then
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5767$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 BUILDEXEEXT=.exe
5769else
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772 BUILDEXEEXT=$EXEEXT
5773fi
5774rmdir CaseSensitiveTestDir
5775
5776case $MACHDEP in
5777bsdos*)
5778 case $CC in
5779 gcc) CC="$CC -D_HAVE_BSDI";;
5780 esac;;
5781esac
5782
5783case $ac_sys_system in
5784hp*|HP*)
5785 case $CC in
5786 cc|*/cc) CC="$CC -Ae";;
5787 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788esac
5789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5792$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793if test -z "$LIBRARY"
5794then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005795 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5798$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800# LDLIBRARY is the name of the library to link against (as opposed to the
5801# name of the library into which to insert object files). BLDLIBRARY is also
5802# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5803# is blank as the main program is not linked directly against LDLIBRARY.
5804# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5805# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5806# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5807# DLLLIBRARY is the shared (i.e., DLL) library.
5808#
5809# RUNSHARED is used to run shared python without installed libraries
5810#
5811# INSTSONAME is the name of the shared library that will be use to install
5812# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005813#
5814# LDVERSION is the shared library version number, normally the Python version
5815# with the ABI build flags appended.
5816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
5818
5819
5820
5821
5822
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005823
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824LDLIBRARY="$LIBRARY"
5825BLDLIBRARY='$(LDLIBRARY)'
5826INSTSONAME='$(LDLIBRARY)'
5827DLLLIBRARY=''
5828LDLIBRARYDIR=''
5829RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005830LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
5832# LINKCC is the command that links the python executable -- default is $(CC).
5833# If CXX is set, and if it is needed to link a main function that was
5834# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5835# python might then depend on the C++ runtime
5836# This is altered for AIX in order to build the export list before
5837# linking.
5838
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5840$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841if test -z "$LINKCC"
5842then
5843 LINKCC='$(PURIFY) $(MAINCC)'
5844 case $ac_sys_system in
5845 AIX*)
5846 exp_extra="\"\""
5847 if test $ac_sys_release -ge 5 -o \
5848 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5849 exp_extra="."
5850 fi
5851 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852 QNX*)
5853 # qcc must be used because the other compilers do not
5854 # support -N.
5855 LINKCC=qcc;;
5856 esac
5857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5859$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
5861# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5862# make sure we default having it set to "no": this is used by
5863# distutils.unixccompiler to know if it should add --enable-new-dtags
5864# to linker command lines, and failing to detect GNU ld simply results
5865# in the same bahaviour as before.
5866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5868$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869ac_prog=ld
5870if test "$GCC" = yes; then
5871 ac_prog=`$CC -print-prog-name=ld`
5872fi
5873case `"$ac_prog" -V 2>&1 < /dev/null` in
5874 *GNU*)
5875 GNULD=yes;;
5876 *)
5877 GNULD=no;;
5878esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5880$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5883$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005884if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005885 $as_echo_n "(cached) " >&6
5886else
5887 ac_cv_c_inline=no
5888for ac_kw in inline __inline__ __inline; do
5889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5890/* end confdefs.h. */
5891#ifndef __cplusplus
5892typedef int foo_t;
5893static $ac_kw foo_t static_foo () {return 0; }
5894$ac_kw foo_t foo () {return 0; }
5895#endif
5896
5897_ACEOF
5898if ac_fn_c_try_compile "$LINENO"; then :
5899 ac_cv_c_inline=$ac_kw
5900fi
5901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5902 test "$ac_cv_c_inline" != no && break
5903done
5904
5905fi
5906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5907$as_echo "$ac_cv_c_inline" >&6; }
5908
5909case $ac_cv_c_inline in
5910 inline | yes) ;;
5911 *)
5912 case $ac_cv_c_inline in
5913 no) ac_val=;;
5914 *) ac_val=$ac_cv_c_inline;;
5915 esac
5916 cat >>confdefs.h <<_ACEOF
5917#ifndef __cplusplus
5918#define inline $ac_val
5919#endif
5920_ACEOF
5921 ;;
5922esac
5923
5924if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005925
5926$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005927
5928
5929fi
5930
5931
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5933$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005935if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 enableval=$enable_shared;
5937fi
5938
5939
5940if test -z "$enable_shared"
5941then
5942 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005943 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 enable_shared="yes";;
5945 *)
5946 enable_shared="no";;
5947 esac
5948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5950$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
Matthias Kloseb9621712010-04-24 17:59:49 +00005952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5953$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005956 enableval=$enable_profiling;
5957fi
5958
5959if test "x$enable_profiling" = xyes; then
5960 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005961 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963/* end confdefs.h. */
5964int main() { return 0; }
5965_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005966if ac_fn_c_try_link "$LINENO"; then :
5967
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005969 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005971rm -f core conftest.err conftest.$ac_objext \
5972 conftest$ac_exeext conftest.$ac_ext
5973 CC="$ac_save_cc"
5974else
5975 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5978$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979
doko@ubuntu.comba015832012-06-30 16:52:05 +02005980if test "x$enable_profiling" = xyes; then
5981 BASECFLAGS="-pg $BASECFLAGS"
5982 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983fi
5984
Matthias Kloseb9621712010-04-24 17:59:49 +00005985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5986$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987
5988# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5989# library that we build, but we do not want to link against it (we
5990# will find it with a -framework option). For this reason there is an
5991# extra variable BLDLIBRARY against which Python and the extension
5992# modules are linked, BLDLIBRARY. This is normally the same as
5993# LDLIBRARY, but empty for MacOSX framework builds.
5994if test "$enable_framework"
5995then
5996 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005997 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 BLDLIBRARY=''
5999else
6000 BLDLIBRARY='$(LDLIBRARY)'
6001fi
6002
6003# Other platforms follow
6004if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006005 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006
Matthias Kloseb9621712010-04-24 17:59:49 +00006007$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
6009 case $ac_sys_system in
6010 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006011 LDLIBRARY='libpython$(LDVERSION).dll.a'
6012 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 ;;
6014 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006015 LDLIBRARY='libpython$(LDVERSION).so'
6016 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006017 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006019 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006020 then
6021 PY3LIBRARY=libpython3.so
6022 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02006024 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006025 LDLIBRARY='libpython$(LDVERSION).so'
6026 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006027 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006029 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006030 then
6031 PY3LIBRARY=libpython3.so
6032 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 ;;
6034 hp*|HP*)
6035 case `uname -m` in
6036 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006037 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038 ;;
6039 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006040 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 ;;
6042 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006043 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006044 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006047 LDLIBRARY='libpython$(LDVERSION).dylib'
6048 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006049 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006051 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006052 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006053 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006054 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055
6056 esac
6057else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006058 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059 case $ac_sys_system in
6060 CYGWIN*)
6061 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006062 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063 ;;
6064 esac
6065fi
6066
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006067if test "$cross_compiling" = yes; then
6068 RUNSHARED=
6069fi
6070
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6072$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073
6074if test -n "$ac_tool_prefix"; then
6075 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6076set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6078$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006079if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081else
6082 if test -n "$RANLIB"; then
6083 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6084else
6085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH
6087do
6088 IFS=$as_save_IFS
6089 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094 break 2
6095 fi
6096done
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098IFS=$as_save_IFS
6099
6100fi
6101fi
6102RANLIB=$ac_cv_prog_RANLIB
6103if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6105$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106else
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109fi
6110
6111
6112fi
6113if test -z "$ac_cv_prog_RANLIB"; then
6114 ac_ct_RANLIB=$RANLIB
6115 # Extract the first word of "ranlib", so it can be a program name with args.
6116set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006119if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121else
6122 if test -n "$ac_ct_RANLIB"; then
6123 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6124else
6125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6126for as_dir in $PATH
6127do
6128 IFS=$as_save_IFS
6129 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134 break 2
6135 fi
6136done
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138IFS=$as_save_IFS
6139
6140fi
6141fi
6142ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6143if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6145$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146else
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149fi
6150
6151 if test "x$ac_ct_RANLIB" = x; then
6152 RANLIB=":"
6153 else
6154 case $cross_compiling:$ac_tool_warned in
6155yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158ac_tool_warned=yes ;;
6159esac
6160 RANLIB=$ac_ct_RANLIB
6161 fi
6162else
6163 RANLIB="$ac_cv_prog_RANLIB"
6164fi
6165
6166
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006167if test -n "$ac_tool_prefix"; then
6168 for ac_prog in ar aal
6169 do
6170 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006174if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176else
6177 if test -n "$AR"; then
6178 ac_cv_prog_AR="$AR" # Let the user override the test.
6179else
6180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181for as_dir in $PATH
6182do
6183 IFS=$as_save_IFS
6184 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006187 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189 break 2
6190 fi
6191done
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193IFS=$as_save_IFS
6194
6195fi
6196fi
6197AR=$ac_cv_prog_AR
6198if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6200$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201else
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204fi
6205
6206
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006207 test -n "$AR" && break
6208 done
6209fi
6210if test -z "$AR"; then
6211 ac_ct_AR=$AR
6212 for ac_prog in ar aal
6213do
6214 # Extract the first word of "$ac_prog", so it can be a program name with args.
6215set dummy $ac_prog; ac_word=$2
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6217$as_echo_n "checking for $ac_word... " >&6; }
6218if ${ac_cv_prog_ac_ct_AR+:} false; then :
6219 $as_echo_n "(cached) " >&6
6220else
6221 if test -n "$ac_ct_AR"; then
6222 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6223else
6224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227 IFS=$as_save_IFS
6228 test -z "$as_dir" && as_dir=.
6229 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006231 ac_cv_prog_ac_ct_AR="$ac_prog"
6232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233 break 2
6234 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006236 done
6237IFS=$as_save_IFS
6238
6239fi
6240fi
6241ac_ct_AR=$ac_cv_prog_ac_ct_AR
6242if test -n "$ac_ct_AR"; then
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6244$as_echo "$ac_ct_AR" >&6; }
6245else
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6247$as_echo "no" >&6; }
6248fi
6249
6250
6251 test -n "$ac_ct_AR" && break
6252done
6253
6254 if test "x$ac_ct_AR" = x; then
6255 AR="ar"
6256 else
6257 case $cross_compiling:$ac_tool_warned in
6258yes:)
6259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6261ac_tool_warned=yes ;;
6262esac
6263 AR=$ac_ct_AR
6264 fi
6265fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266
6267
6268# tweak ARFLAGS only if the user didn't set it on the command line
6269
6270if test -z "$ARFLAGS"
6271then
6272 ARFLAGS="rc"
6273fi
6274
doko@ubuntu.com58844492012-06-30 18:25:32 +02006275if test -n "$ac_tool_prefix"; then
6276 for ac_prog in readelf
6277 do
6278 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6279set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281$as_echo_n "checking for $ac_word... " >&6; }
6282if ${ac_cv_prog_READELF+:} false; then :
6283 $as_echo_n "(cached) " >&6
6284else
6285 if test -n "$READELF"; then
6286 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6287else
6288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291 IFS=$as_save_IFS
6292 test -z "$as_dir" && as_dir=.
6293 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006294 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006295 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297 break 2
6298 fi
6299done
6300 done
6301IFS=$as_save_IFS
6302
6303fi
6304fi
6305READELF=$ac_cv_prog_READELF
6306if test -n "$READELF"; then
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6308$as_echo "$READELF" >&6; }
6309else
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
6312fi
6313
6314
6315 test -n "$READELF" && break
6316 done
6317fi
6318if test -z "$READELF"; then
6319 ac_ct_READELF=$READELF
6320 for ac_prog in readelf
6321do
6322 # Extract the first word of "$ac_prog", so it can be a program name with args.
6323set dummy $ac_prog; ac_word=$2
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6325$as_echo_n "checking for $ac_word... " >&6; }
6326if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6327 $as_echo_n "(cached) " >&6
6328else
6329 if test -n "$ac_ct_READELF"; then
6330 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6331else
6332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333for as_dir in $PATH
6334do
6335 IFS=$as_save_IFS
6336 test -z "$as_dir" && as_dir=.
6337 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006338 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006339 ac_cv_prog_ac_ct_READELF="$ac_prog"
6340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6341 break 2
6342 fi
6343done
6344 done
6345IFS=$as_save_IFS
6346
6347fi
6348fi
6349ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6350if test -n "$ac_ct_READELF"; then
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6352$as_echo "$ac_ct_READELF" >&6; }
6353else
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359 test -n "$ac_ct_READELF" && break
6360done
6361
6362 if test "x$ac_ct_READELF" = x; then
6363 READELF=":"
6364 else
6365 case $cross_compiling:$ac_tool_warned in
6366yes:)
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6368$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6369ac_tool_warned=yes ;;
6370esac
6371 READELF=$ac_ct_READELF
6372 fi
6373fi
6374
6375if test "$cross_compiling" = yes; then
6376 case "$READELF" in
6377 readelf|:)
6378 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6379 ;;
6380 esac
6381fi
6382
6383
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385case $MACHDEP in
6386bsdos*|hp*|HP*)
6387 # install -d does not work on BSDI or HP-UX
6388 if test -z "$INSTALL"
6389 then
6390 INSTALL="${srcdir}/install-sh -c"
6391 fi
6392esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393# Find a good install program. We prefer a C program (faster),
6394# so one script is as good as another. But avoid the broken or
6395# incompatible versions:
6396# SysV /etc/install, /usr/sbin/install
6397# SunOS /usr/etc/install
6398# IRIX /sbin/install
6399# AIX /bin/install
6400# AmigaOS /C/install, which installs bootblocks on floppy discs
6401# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6402# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6403# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6404# OS/2's system install, which has a completely different semantic
6405# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006406# Reject install programs that cannot install multiple files.
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6408$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006410if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006411 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412else
6413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414for as_dir in $PATH
6415do
6416 IFS=$as_save_IFS
6417 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006418 # Account for people who put trailing slashes in PATH elements.
6419case $as_dir/ in #((
6420 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006422 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 /usr/ucb/* ) ;;
6424 *)
6425 # OSF1 and SCO ODT 3.0 have their own names for install.
6426 # Don't use installbsd from OSF since it installs stuff as root
6427 # by default.
6428 for ac_prog in ginstall scoinst install; do
6429 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006430 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431 if test $ac_prog = install &&
6432 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6433 # AIX install. It has an incompatible calling convention.
6434 :
6435 elif test $ac_prog = install &&
6436 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6437 # program-specific install script used by HP pwplus--don't use.
6438 :
6439 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006440 rm -rf conftest.one conftest.two conftest.dir
6441 echo one > conftest.one
6442 echo two > conftest.two
6443 mkdir conftest.dir
6444 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6445 test -s conftest.one && test -s conftest.two &&
6446 test -s conftest.dir/conftest.one &&
6447 test -s conftest.dir/conftest.two
6448 then
6449 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6450 break 3
6451 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452 fi
6453 fi
6454 done
6455 done
6456 ;;
6457esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006458
6459 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460IFS=$as_save_IFS
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463
6464fi
6465 if test "${ac_cv_path_install+set}" = set; then
6466 INSTALL=$ac_cv_path_install
6467 else
6468 # As a last resort, use the slow shell script. Don't cache a
6469 # value for INSTALL within a source directory, because that will
6470 # break other packages using the cache if that directory is
6471 # removed, or if the value is a relative name.
6472 INSTALL=$ac_install_sh
6473 fi
6474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6476$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477
6478# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6479# It thinks the first close brace ends the variable substitution.
6480test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6481
6482test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6483
6484test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6485
Matthias Klose93a0ef12012-03-15 18:08:34 +01006486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6487$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6488if test -z "$MKDIR_P"; then
6489 if ${ac_cv_path_mkdir+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491else
6492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6493for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6494do
6495 IFS=$as_save_IFS
6496 test -z "$as_dir" && as_dir=.
6497 for ac_prog in mkdir gmkdir; do
6498 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006499 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006500 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6501 'mkdir (GNU coreutils) '* | \
6502 'mkdir (coreutils) '* | \
6503 'mkdir (fileutils) '4.1*)
6504 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6505 break 3;;
6506 esac
6507 done
6508 done
6509 done
6510IFS=$as_save_IFS
6511
6512fi
6513
6514 test -d ./--version && rmdir ./--version
6515 if test "${ac_cv_path_mkdir+set}" = set; then
6516 MKDIR_P="$ac_cv_path_mkdir -p"
6517 else
6518 # As a last resort, use the slow shell script. Don't cache a
6519 # value for MKDIR_P within a source directory, because that will
6520 # break other packages using the cache if that directory is
6521 # removed, or if the value is a relative name.
6522 MKDIR_P="$ac_install_sh -d"
6523 fi
6524fi
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6526$as_echo "$MKDIR_P" >&6; }
6527
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528
6529# Not every filesystem supports hard links
6530
6531if test -z "$LN" ; then
6532 case $ac_sys_system in
6533 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534 *) LN=ln;;
6535 esac
6536fi
6537
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006538# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006539
6540ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6544$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
6546# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006547if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006548 withval=$with_pydebug;
6549if test "$withval" != no
6550then
6551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6555$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006557 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006558else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560fi
6561else
Matthias Kloseb9621712010-04-24 17:59:49 +00006562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564fi
6565
6566
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006567# Enable LTO flags
6568
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6570$as_echo_n "checking for --with-lto... " >&6; }
6571
6572# Check whether --with-lto was given.
6573if test "${with_lto+set}" = set; then :
6574 withval=$with_lto;
6575if test "$withval" != no
6576then
6577 Py_LTO='true'
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6579$as_echo "yes" >&6; };
6580else
6581 Py_LTO='false'
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583$as_echo "no" >&6; };
6584fi
6585else
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589
6590if test "$Py_LTO" = 'true' ; then
6591 case $CC in
6592 *clang*)
6593 # Any changes made here should be reflected in the GCC+Darwin case below
6594 LTOFLAGS="-flto"
6595 ;;
6596 *gcc*)
6597 case $ac_sys_system in
6598 Darwin*)
6599 LTOFLAGS="-flto"
6600 ;;
6601 *)
6602 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6603 ;;
6604 esac
6605 ;;
6606 esac
6607fi
6608
Brett Cannon7188a3e2015-09-18 15:13:44 -07006609# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006610
6611
6612
6613
6614
6615
Brett Cannon7188a3e2015-09-18 15:13:44 -07006616# Extract the first word of "llvm-profdata", so it can be a program name with args.
6617set dummy llvm-profdata; ac_word=$2
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619$as_echo_n "checking for $ac_word... " >&6; }
6620if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6621 $as_echo_n "(cached) " >&6
6622else
6623 if test -n "$LLVM_PROF_FOUND"; then
6624 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6625else
6626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629 IFS=$as_save_IFS
6630 test -z "$as_dir" && as_dir=.
6631 for ac_exec_ext in '' $ac_executable_extensions; do
6632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6633 ac_cv_prog_LLVM_PROF_FOUND="found"
6634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6635 break 2
6636 fi
6637done
6638 done
6639IFS=$as_save_IFS
6640
6641 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6642fi
6643fi
6644LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6645if test -n "$LLVM_PROF_FOUND"; then
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6647$as_echo "$LLVM_PROF_FOUND" >&6; }
6648else
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6650$as_echo "no" >&6; }
6651fi
6652
6653
6654LLVM_PROF_ERR=no
6655case $CC in
6656 *clang*)
6657 # Any changes made here should be reflected in the GCC+Darwin case below
6658 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6659 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6660 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6661 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6662 if test $LLVM_PROF_FOUND = not-found
6663 then
6664 LLVM_PROF_ERR=yes
6665 fi
6666 ;;
6667 *gcc*)
6668 case $ac_sys_system in
6669 Darwin*)
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 *)
6680 PGO_PROF_GEN_FLAG="-fprofile-generate"
6681 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6682 LLVM_PROF_MERGER="true"
6683 LLVM_PROF_FILE=""
6684 ;;
6685 esac
6686 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006687 *icc*)
6688 PGO_PROF_GEN_FLAG="-prof-gen"
6689 PGO_PROF_USE_FLAG="-prof-use"
6690 LLVM_PROF_MERGER="true"
6691 LLVM_PROF_FILE=""
6692 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006693esac
6694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6696# merged with this chunk of code?
6697
6698# Optimizer/debugger flags
6699# ------------------------
6700# (The following bit of code is complicated enough - please keep things
6701# indented properly. Just pretend you're editing Python code. ;-)
6702
6703# There are two parallel sets of case statements below, one that checks to
6704# see if OPT was set and one that does BASECFLAGS setting based upon
6705# compiler and platform. BASECFLAGS tweaks need to be made even if the
6706# user set OPT.
6707
6708# tweak OPT based on compiler and platform, only if the user didn't set
6709# it on the command line
6710
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006711if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006712then
6713 case $GCC in
6714 yes)
6715 if test "$CC" != 'g++' ; then
6716 STRICT_PROTO="-Wstrict-prototypes"
6717 fi
6718 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6719 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6720 WRAP="-fwrapv"
6721 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006722
6723 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006724 case $CC in
6725 *clang*) WRAP="-fwrapv"
6726 ;;
6727 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 case $ac_cv_prog_cc_g in
6730 yes)
6731 if test "$Py_DEBUG" = 'true' ; then
6732 # Optimization messes up debuggers, so turn it off for
6733 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006734 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6735 OPT="-g -Og -Wall $STRICT_PROTO"
6736 else
6737 OPT="-g -O0 -Wall $STRICT_PROTO"
6738 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739 else
6740 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6741 fi
6742 ;;
6743 *)
6744 OPT="-O3 -Wall $STRICT_PROTO"
6745 ;;
6746 esac
6747 case $ac_sys_system in
6748 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6749 ;;
6750 esac
6751 ;;
6752
6753 *)
6754 OPT="-O"
6755 ;;
6756 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757fi
6758
6759
6760
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762# The -arch flags for universal builds on OSX
6763UNIVERSAL_ARCH_FLAGS=
6764
6765
6766# tweak BASECFLAGS based on compiler and platform
6767case $GCC in
6768yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006769 # Python doesn't violate C99 aliasing rules, but older versions of
6770 # GCC produce warnings for legal Python code. Enable
6771 # -fno-strict-aliasing on versions of GCC that support but produce
6772 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6774$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775 ac_save_cc="$CC"
6776 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006777 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006778 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006780else
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006783
Matthias Kloseb159a552010-04-25 21:00:44 +00006784
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006785int
6786main ()
6787{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006788
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006789 ;
6790 return 0;
6791}
Matthias Kloseb159a552010-04-25 21:00:44 +00006792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006794if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006795
6796 CC="$ac_save_cc -fstrict-aliasing"
6797 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006799/* end confdefs.h. */
6800
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006801 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006802int
6803main ()
6804{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006805double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806 ;
6807 return 0;
6808}
Matthias Kloseb159a552010-04-25 21:00:44 +00006809
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006811if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006812
6813 ac_cv_no_strict_aliasing=no
6814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815else
Matthias Kloseb159a552010-04-25 21:00:44 +00006816
6817 ac_cv_no_strict_aliasing=yes
6818
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006819fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822else
Matthias Kloseb159a552010-04-25 21:00:44 +00006823
6824 ac_cv_no_strict_aliasing=no
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006828fi
6829
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006830 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6833$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835 then
6836 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6837 fi
6838
Zachary Ware5af85642015-12-21 12:09:17 -06006839 # ICC doesn't recognize the option, but only emits a warning
6840 ## XXX does it emit an unused result warning and can it be disabled?
6841 case "$CC" in
6842 *icc*)
6843 ac_cv_disable_unused_result_warning=no
6844 ;;
6845 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6847$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6848 ac_save_cc="$CC"
6849 CC="$CC -Wunused-result -Werror"
6850 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006851 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006852 $as_echo_n "(cached) " >&6
6853else
6854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855/* end confdefs.h. */
6856
6857
6858int
6859main ()
6860{
6861
6862 ;
6863 return 0;
6864}
6865
6866_ACEOF
6867if ac_fn_c_try_compile "$LINENO"; then :
6868
6869 ac_cv_disable_unused_result_warning=yes
6870
6871else
6872
6873 ac_cv_disable_unused_result_warning=no
6874
6875fi
6876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6877fi
6878
6879 CFLAGS="$save_CFLAGS"
6880 CC="$ac_save_cc"
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6882$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006883 ;;
6884 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006885
6886 if test $ac_cv_disable_unused_result_warning = yes
6887 then
6888 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6889 fi
6890
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6892$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6893 ac_save_cc="$CC"
6894 CC="$CC -Werror=declaration-after-statement"
6895 save_CFLAGS="$CFLAGS"
6896 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6897 $as_echo_n "(cached) " >&6
6898else
6899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6900/* end confdefs.h. */
6901
6902
6903int
6904main ()
6905{
6906
6907 ;
6908 return 0;
6909}
6910
6911_ACEOF
6912if ac_fn_c_try_compile "$LINENO"; then :
6913
6914 ac_cv_declaration_after_statement_warning=yes
6915
6916else
6917
6918 ac_cv_declaration_after_statement_warning=no
6919
6920fi
6921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6922fi
6923
6924 CFLAGS="$save_CFLAGS"
6925 CC="$ac_save_cc"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6927$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6928
6929 if test $ac_cv_declaration_after_statement_warning = yes
6930 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006931 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006932 fi
6933
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6935$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6936 ac_save_cc="$CC"
6937 CC="$CC -Wsign-compare"
6938 save_CFLAGS="$CFLAGS"
6939 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941else
6942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943/* end confdefs.h. */
6944
6945
6946int
6947main ()
6948{
6949
6950 ;
6951 return 0;
6952}
6953
6954_ACEOF
6955if ac_fn_c_try_compile "$LINENO"; then :
6956
6957 ac_cv_enable_sign_compare_warning=yes
6958
6959else
6960
6961 ac_cv_enable_sign_compare_warning=no
6962
6963fi
6964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6965fi
6966
6967 CFLAGS="$save_CFLAGS"
6968 CC="$ac_save_cc"
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6970$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6971
6972 if test $ac_cv_enable_sign_compare_warning = yes
6973 then
6974 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6975 fi
6976
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6978$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6979 ac_save_cc="$CC"
6980 CC="$CC -Wunreachable-code"
6981 save_CFLAGS="$CFLAGS"
6982 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6983 $as_echo_n "(cached) " >&6
6984else
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986/* end confdefs.h. */
6987
6988
6989int
6990main ()
6991{
6992
6993 ;
6994 return 0;
6995}
6996
6997_ACEOF
6998if ac_fn_c_try_compile "$LINENO"; then :
6999
7000 ac_cv_enable_unreachable_code_warning=yes
7001
7002else
7003
7004 ac_cv_enable_unreachable_code_warning=no
7005
7006fi
7007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7008fi
7009
7010 CFLAGS="$save_CFLAGS"
7011 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007012
7013 # Don't enable unreachable code warning in debug mode, since it usually
7014 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007015 # Issue #24324: Unfortunately, the unreachable code warning does not work
7016 # correctly on gcc and has been silently removed from the compiler.
7017 # It is supported on clang but on OS X systems gcc may be an alias
7018 # for clang. Try to determine if the compiler is not really gcc and,
7019 # if so, only then enable the warning.
7020 if test $ac_cv_enable_unreachable_code_warning = yes && \
7021 test "$Py_DEBUG" != "true" && \
7022 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007023 then
7024 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007025 else
7026 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007027 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7029$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007030
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7032 # support. Without this, treatment of subnormals doesn't follow
7033 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007034 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035 alpha*)
7036 BASECFLAGS="$BASECFLAGS -mieee"
7037 ;;
7038 esac
7039
7040 case $ac_sys_system in
7041 SCO_SV*)
7042 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7043 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007044
7045 # is there any other compiler on Darwin besides gcc?
7046 Darwin*)
7047 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7048 # used to be here, but non-Apple gcc doesn't accept them.
7049 if test "${CC}" = gcc
7050 then
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007052$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007053 case "${UNIVERSALSDK}" in
7054 */MacOSX10.4u.sdk)
7055 # Build using 10.4 SDK, force usage of gcc when the
7056 # compiler is gcc, otherwise the user will get very
7057 # confusing error messages when building on OSX 10.6
7058 CC=gcc-4.0
7059 CPP=cpp-4.0
7060 ;;
7061 esac
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007063$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007064 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065
Ned Deily87adb6e2013-10-18 21:09:56 -07007066 if test "${enable_universalsdk}"
7067 then
7068 case "$UNIVERSAL_ARCHS" in
7069 32-bit)
7070 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7071 LIPO_32BIT_FLAGS=""
7072 ARCH_RUN_32BIT=""
7073 ;;
7074 64-bit)
7075 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7076 LIPO_32BIT_FLAGS=""
7077 ARCH_RUN_32BIT="true"
7078 ;;
7079 all)
7080 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7081 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7082 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7083 ;;
7084 intel)
7085 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7086 LIPO_32BIT_FLAGS="-extract i386"
7087 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7088 ;;
7089 intel-32)
7090 UNIVERSAL_ARCH_FLAGS="-arch i386"
7091 LIPO_32BIT_FLAGS=""
7092 ARCH_RUN_32BIT=""
7093 ;;
7094 3-way)
7095 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7096 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7097 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7098 ;;
7099 *)
7100 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7101 ;;
7102 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007103
Ned Deily87adb6e2013-10-18 21:09:56 -07007104 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7105 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7106 if test "${UNIVERSALSDK}" != "/"
7107 then
7108 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7109 fi
7110 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111
Ned Deily87adb6e2013-10-18 21:09:56 -07007112 # Calculate an appropriate deployment target for this build:
7113 # The deployment target value is used explicitly to enable certain
7114 # features are enabled (such as builtin libedit support for readline)
7115 # through the use of Apple's Availabiliy Macros and is used as a
7116 # component of the string returned by distutils.get_platform().
7117 #
7118 # Use the value from:
7119 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7120 # 2. the operating system version of the build machine if >= 10.6
7121 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7122 # below to pick either 10.3, 10.4, or 10.5 as the target.
7123 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124
Ned Deily87adb6e2013-10-18 21:09:56 -07007125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7126$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007127 cur_target_major=`sw_vers -productVersion | \
7128 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7129 cur_target_minor=`sw_vers -productVersion | \
7130 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7131 cur_target="${cur_target_major}.${cur_target_minor}"
7132 if test ${cur_target_major} -eq 10 && \
7133 test ${cur_target_minor} -ge 3 && \
7134 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007135 then
Ned Deily36820b62014-06-25 13:44:22 -07007136 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007137 cur_target=10.3
7138 if test ${enable_universalsdk}
7139 then
7140 case "$UNIVERSAL_ARCHS" in
7141 all|3-way|intel|64-bit)
7142 # These configurations were first supported in 10.5
7143 cur_target='10.5'
7144 ;;
7145 esac
7146 else
7147 if test `/usr/bin/arch` = "i386"
7148 then
7149 # 10.4 was the first release to support Intel archs
7150 cur_target="10.4"
7151 fi
7152 fi
7153 fi
7154 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007155
Ned Deily87adb6e2013-10-18 21:09:56 -07007156 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7157 # environment with a value that is the same as what we'll use
7158 # in the Makefile to ensure that we'll get the same compiler
7159 # environment during configure and build time.
7160 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7161 export MACOSX_DEPLOYMENT_TARGET
7162 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7164$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007165
Ned Deily87adb6e2013-10-18 21:09:56 -07007166 # end of Darwin* tests
7167 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168 esac
7169 ;;
7170
7171*)
7172 case $ac_sys_system in
7173 OpenUNIX*|UnixWare*)
7174 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7175 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007176 SCO_SV*)
7177 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7178 ;;
7179 esac
7180 ;;
7181esac
7182
Zachary Ware5af85642015-12-21 12:09:17 -06007183# ICC needs -fp-model strict or floats behave badly
7184case "$CC" in
7185*icc*)
7186 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7187 ;;
7188esac
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190if test "$Py_DEBUG" = 'true'; then
7191 :
7192else
7193 OPT="-DNDEBUG $OPT"
7194fi
7195
7196if test "$ac_arch_flags"
7197then
7198 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7199fi
7200
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201# On some compilers, pthreads are available without further options
7202# (e.g. MacOS X). On some of these systems, the compiler will not
7203# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7204# So we have to see first whether pthreads are available without
7205# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7207$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007208if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210else
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212 ac_cv_pthread_is_default=no
7213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215/* end confdefs.h. */
7216
Stefan Krah7dba5942012-11-22 22:49:11 +01007217#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218#include <pthread.h>
7219
7220void* routine(void* p){return NULL;}
7221
7222int main(){
7223 pthread_t p;
7224 if(pthread_create(&p,NULL,routine,NULL)!=0)
7225 return 1;
7226 (void)pthread_detach(p);
7227 return 0;
7228}
7229
7230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232
7233 ac_cv_pthread_is_default=yes
7234 ac_cv_kthread=no
7235 ac_cv_pthread=no
7236
7237else
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7241 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242fi
7243
7244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245fi
7246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7248$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249
7250
7251if test $ac_cv_pthread_is_default = yes
7252then
7253 ac_cv_kpthread=no
7254else
7255# -Kpthread, if available, provides the right #defines
7256# and linker options to make pthread_create available
7257# Some compilers won't report that they do not support -Kpthread,
7258# so we need to run a program to see whether it really made the
7259# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7261$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007262if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007263 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007264else
7265 ac_save_cc="$CC"
7266CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007267if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268 ac_cv_kpthread=no
7269else
Matthias Kloseb9621712010-04-24 17:59:49 +00007270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271/* end confdefs.h. */
7272
Stefan Krah7dba5942012-11-22 22:49:11 +01007273#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274#include <pthread.h>
7275
7276void* routine(void* p){return NULL;}
7277
7278int main(){
7279 pthread_t p;
7280 if(pthread_create(&p,NULL,routine,NULL)!=0)
7281 return 1;
7282 (void)pthread_detach(p);
7283 return 0;
7284}
7285
7286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007287if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288 ac_cv_kpthread=yes
7289else
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7293 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294fi
7295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296CC="$ac_save_cc"
7297fi
7298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7300$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301fi
7302
7303if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7304then
7305# -Kthread, if available, provides the right #defines
7306# and linker options to make pthread_create available
7307# Some compilers won't report that they do not support -Kthread,
7308# so we need to run a program to see whether it really made the
7309# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7311$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007312if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314else
7315 ac_save_cc="$CC"
7316CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 ac_cv_kthread=no
7319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321/* end confdefs.h. */
7322
Stefan Krah7dba5942012-11-22 22:49:11 +01007323#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324#include <pthread.h>
7325
7326void* routine(void* p){return NULL;}
7327
7328int main(){
7329 pthread_t p;
7330 if(pthread_create(&p,NULL,routine,NULL)!=0)
7331 return 1;
7332 (void)pthread_detach(p);
7333 return 0;
7334}
7335
7336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007337if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338 ac_cv_kthread=yes
7339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344fi
7345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346CC="$ac_save_cc"
7347fi
7348
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7350$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351fi
7352
7353if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7354then
7355# -pthread, if available, provides the right #defines
7356# and linker options to make pthread_create available
7357# Some compilers won't report that they do not support -pthread,
7358# so we need to run a program to see whether it really made the
7359# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7361$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007362if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364else
7365 ac_save_cc="$CC"
7366CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007367if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368 ac_cv_pthread=no
7369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371/* end confdefs.h. */
7372
Stefan Krah7dba5942012-11-22 22:49:11 +01007373#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374#include <pthread.h>
7375
7376void* routine(void* p){return NULL;}
7377
7378int main(){
7379 pthread_t p;
7380 if(pthread_create(&p,NULL,routine,NULL)!=0)
7381 return 1;
7382 (void)pthread_detach(p);
7383 return 0;
7384}
7385
7386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007387if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388 ac_cv_pthread=yes
7389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394fi
7395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396CC="$ac_save_cc"
7397fi
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7400$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401fi
7402
7403# If we have set a CC compiler flag for thread support then
7404# check if it works for CXX, too.
7405ac_cv_cxx_thread=no
7406if test ! -z "$CXX"
7407then
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7409$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410ac_save_cxx="$CXX"
7411
7412if test "$ac_cv_kpthread" = "yes"
7413then
7414 CXX="$CXX -Kpthread"
7415 ac_cv_cxx_thread=yes
7416elif test "$ac_cv_kthread" = "yes"
7417then
7418 CXX="$CXX -Kthread"
7419 ac_cv_cxx_thread=yes
7420elif test "$ac_cv_pthread" = "yes"
7421then
7422 CXX="$CXX -pthread"
7423 ac_cv_cxx_thread=yes
7424fi
7425
7426if test $ac_cv_cxx_thread = yes
7427then
7428 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7429 $CXX -c conftest.$ac_ext 2>&5
7430 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7431 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7432 then
7433 ac_cv_cxx_thread=yes
7434 else
7435 ac_cv_cxx_thread=no
7436 fi
7437 rm -fr conftest*
7438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7440$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441fi
7442CXX="$ac_save_cxx"
7443
7444
7445# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7447$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007448if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450else
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452/* end confdefs.h. */
7453#include <stdlib.h>
7454#include <stdarg.h>
7455#include <string.h>
7456#include <float.h>
7457
7458int
7459main ()
7460{
7461
7462 ;
7463 return 0;
7464}
7465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007466if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467 ac_cv_header_stdc=yes
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7472
7473if test $ac_cv_header_stdc = yes; then
7474 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476/* end confdefs.h. */
7477#include <string.h>
7478
7479_ACEOF
7480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 $EGREP "memchr" >/dev/null 2>&1; then :
7482
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483else
7484 ac_cv_header_stdc=no
7485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007486rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487
7488fi
7489
7490if test $ac_cv_header_stdc = yes; then
7491 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493/* end confdefs.h. */
7494#include <stdlib.h>
7495
7496_ACEOF
7497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 $EGREP "free" >/dev/null 2>&1; then :
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500else
7501 ac_cv_header_stdc=no
7502fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007503rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
7505fi
7506
7507if test $ac_cv_header_stdc = yes; then
7508 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510 :
7511else
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513/* end confdefs.h. */
7514#include <ctype.h>
7515#include <stdlib.h>
7516#if ((' ' & 0x0FF) == 0x020)
7517# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7518# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7519#else
7520# define ISLOWER(c) \
7521 (('a' <= (c) && (c) <= 'i') \
7522 || ('j' <= (c) && (c) <= 'r') \
7523 || ('s' <= (c) && (c) <= 'z'))
7524# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7525#endif
7526
7527#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7528int
7529main ()
7530{
7531 int i;
7532 for (i = 0; i < 256; i++)
7533 if (XOR (islower (i), ISLOWER (i))
7534 || toupper (i) != TOUPPER (i))
7535 return 2;
7536 return 0;
7537}
7538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007539if ac_fn_c_try_run "$LINENO"; then :
7540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
7547
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548fi
7549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7551$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552if test $ac_cv_header_stdc = yes; then
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555
7556fi
7557
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007558for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007559fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007560ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007561sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007562unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007563poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007564sys/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 +01007565sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007566sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007567sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007568sys/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 -07007569libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007570bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007571sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007572do :
7573 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7574ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007578_ACEOF
7579
7580fi
7581
Guido van Rossum627b2d71993-12-24 10:39:16 +00007582done
7583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007584ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007585for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7588$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007589if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007591else
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007593/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007594#include <sys/types.h>
7595#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007596
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
7600if ((DIR *) 0)
7601return 0;
7602 ;
7603 return 0;
7604}
7605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007607 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613eval ac_res=\$$as_ac_Header
7614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7615$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007616if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007618#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007619_ACEOF
7620
7621ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007624done
7625# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7626if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7628$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007631else
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636/* Override any GCC internal prototype to avoid an error.
7637 Use char because int might match the return type of a GCC
7638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007639#ifdef __cplusplus
7640extern "C"
7641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007642char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007643int
7644main ()
7645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007647 ;
7648 return 0;
7649}
7650_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651for ac_lib in '' dir; do
7652 if test -z "$ac_lib"; then
7653 ac_res="none required"
7654 else
7655 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007656 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007661rm -f core conftest.err conftest.$ac_objext \
7662 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007663 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666done
Victor Stinnere0be4232011-10-25 13:06:09 +02007667if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669else
7670 ac_cv_search_opendir=no
7671fi
7672rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007673LIBS=$ac_func_search_save_LIBS
7674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7676$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007678if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007680
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007681fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007682
Michael W. Hudson54241132001-12-07 15:38:26 +00007683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7685$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007686if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007688else
7689 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693/* Override any GCC internal prototype to avoid an error.
7694 Use char because int might match the return type of a GCC
7695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007696#ifdef __cplusplus
7697extern "C"
7698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007699char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007700int
7701main ()
7702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ;
7705 return 0;
7706}
7707_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708for ac_lib in '' x; do
7709 if test -z "$ac_lib"; then
7710 ac_res="none required"
7711 else
7712 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007713 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007718rm -f core conftest.err conftest.$ac_objext \
7719 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007720 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723done
Victor Stinnere0be4232011-10-25 13:06:09 +02007724if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726else
7727 ac_cv_search_opendir=no
7728fi
7729rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007730LIBS=$ac_func_search_save_LIBS
7731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7733$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007735if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007738fi
7739
7740fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007741
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7743$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007744if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007748/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007749#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007750int
7751main ()
7752{
7753return makedev(0, 0);
7754 ;
7755 return 0;
7756}
7757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007759 ac_cv_header_sys_types_h_makedev=yes
7760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763rm -f core conftest.err conftest.$ac_objext \
7764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007765
7766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7768$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007769
7770if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007771ac_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 +02007772if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007773
Matthias Kloseb9621712010-04-24 17:59:49 +00007774$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007775
7776fi
7777
7778
7779
7780 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 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 +02007782if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007785
7786fi
7787
7788
7789 fi
7790fi
7791
Michael W. Hudson54241132001-12-07 15:38:26 +00007792
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007793# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7794for ac_header in net/if.h
7795do :
7796 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7797#ifdef STDC_HEADERS
7798# include <stdlib.h>
7799# include <stddef.h>
7800#else
7801# ifdef HAVE_STDLIB_H
7802# include <stdlib.h>
7803# endif
7804#endif
7805#ifdef HAVE_SYS_SOCKET_H
7806# include <sys/socket.h>
7807#endif
7808
7809"
Victor Stinnere0be4232011-10-25 13:06:09 +02007810if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_NET_IF_H 1
7813_ACEOF
7814
7815fi
7816
7817done
7818
7819
Martin v. Löwis11017b12006-01-14 18:12:57 +00007820# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007821for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007822do :
7823 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 +00007824#ifdef HAVE_ASM_TYPES_H
7825#include <asm/types.h>
7826#endif
7827#ifdef HAVE_SYS_SOCKET_H
7828#include <sys/socket.h>
7829#endif
7830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831"
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007833 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007834#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007835_ACEOF
7836
7837fi
7838
7839done
7840
7841
Charles-François Natali47413c12011-10-06 19:47:44 +02007842# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007843for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007844do :
7845 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7846ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7847#ifdef HAVE_SYS_SOCKET_H
7848#include <sys/socket.h>
7849#endif
7850
7851"
7852if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7853 cat >>confdefs.h <<_ACEOF
7854#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7855_ACEOF
7856
7857fi
7858
7859done
7860
7861
Guido van Rossum627b2d71993-12-24 10:39:16 +00007862# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007863was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7865$as_echo_n "checking for clock_t in time.h... " >&6; }
7866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007867/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007869
7870_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007873 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007874else
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
7876
Matthias Kloseb9621712010-04-24 17:59:49 +00007877$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007878
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007879
Guido van Rossum627b2d71993-12-24 10:39:16 +00007880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007881rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007882
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7884$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007885
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7887$as_echo_n "checking for makedev... " >&6; }
7888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007890
Jesus Cea740f53a2010-04-28 11:35:30 +00007891#if defined(MAJOR_IN_MKDEV)
7892#include <sys/mkdev.h>
7893#elif defined(MAJOR_IN_SYSMACROS)
7894#include <sys/sysmacros.h>
7895#else
7896#include <sys/types.h>
7897#endif
7898
Neal Norwitz11690112002-07-30 01:08:28 +00007899int
7900main ()
7901{
Jesus Cea740f53a2010-04-28 11:35:30 +00007902
7903 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007904 ;
7905 return 0;
7906}
Matthias Kloseb159a552010-04-25 21:00:44 +00007907
Neal Norwitz11690112002-07-30 01:08:28 +00007908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007909if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007910 ac_cv_has_makedev=yes
7911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914rm -f core conftest.err conftest.$ac_objext \
7915 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7917$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007918if test "$ac_cv_has_makedev" = "yes"; then
7919
Matthias Kloseb9621712010-04-24 17:59:49 +00007920$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007921
7922fi
7923
Christian Heimes985ecdc2013-11-20 11:46:18 +01007924# byte swapping
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7926$as_echo_n "checking for le64toh... " >&6; }
7927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7928/* end confdefs.h. */
7929
7930#ifdef HAVE_ENDIAN_H
7931#include <endian.h>
7932#elif defined(HAVE_SYS_ENDIAN_H)
7933#include <sys/endian.h>
7934#endif
7935
7936int
7937main ()
7938{
7939
7940 le64toh(1)
7941 ;
7942 return 0;
7943}
7944
7945_ACEOF
7946if ac_fn_c_try_link "$LINENO"; then :
7947 ac_cv_has_le64toh=yes
7948else
7949 ac_cv_has_le64toh=no
7950fi
7951rm -f core conftest.err conftest.$ac_objext \
7952 conftest$ac_exeext conftest.$ac_ext
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7954$as_echo "$ac_cv_has_le64toh" >&6; }
7955if test "$ac_cv_has_le64toh" = "yes"; then
7956
7957$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7958
7959fi
7960
Martin v. Löwis399a6892002-10-04 10:22:02 +00007961# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7962# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7963# defined, but the compiler does not support pragma redefine_extname,
7964# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7965# structures (such as rlimit64) without declaring them. As a
7966# work-around, disable LFS on such configurations
7967
7968use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7970$as_echo_n "checking Solaris LFS bug... " >&6; }
7971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007973
7974#define _LARGEFILE_SOURCE 1
7975#define _FILE_OFFSET_BITS 64
7976#include <sys/resource.h>
7977
Martin v. Löwis399a6892002-10-04 10:22:02 +00007978int
7979main ()
7980{
7981struct rlimit foo;
7982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007987 sol_lfs_bug=no
7988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7993$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007994if test "$sol_lfs_bug" = "yes"; then
7995 use_lfs=no
7996fi
7997
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007998# Don't use largefile support for GNU/Hurd
7999case $ac_sys_system in GNU*)
8000 use_lfs=no
8001esac
8002
Martin v. Löwis399a6892002-10-04 10:22:02 +00008003if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008004# Two defines needed to enable largefile support on various platforms
8005# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008006case $ac_sys_system/$ac_sys_release in
8007AIX*)
8008
8009$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8010
8011 ;;
8012esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
8016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008018
Martin v. Löwis399a6892002-10-04 10:22:02 +00008019fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008020
Guido van Rossum84e7b241996-08-19 21:59:00 +00008021# Add some code to confdefs.h so that the test for off_t works on SCO
8022cat >> confdefs.h <<\EOF
8023#if defined(SCO_DS)
8024#undef _OFF_T
8025#endif
8026EOF
8027
Guido van Rossumef2255b2000-03-10 22:30:29 +00008028# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008029ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008030if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032else
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
8034cat >>confdefs.h <<_ACEOF
8035#define mode_t int
8036_ACEOF
8037
8038fi
8039
Matthias Kloseb9621712010-04-24 17:59:49 +00008040ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008041if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008043else
Martin v. Löwis11437992002-04-12 09:54:03 +00008044
8045cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008047_ACEOF
8048
8049fi
8050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
8056cat >>confdefs.h <<_ACEOF
8057#define pid_t int
8058_ACEOF
8059
8060fi
8061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008062
Martin v. Löwis11437992002-04-12 09:54:03 +00008063cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008064#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008065_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008068if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008070else
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
8072cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008074_ACEOF
8075
8076fi
8077
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8079$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008080if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
8087_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008090 ac_cv_type_uid_t=yes
8091else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092 ac_cv_type_uid_t=no
8093fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008094rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8098$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008099if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008102
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008105
8106fi
8107
Mark Dickinson983bc162012-12-02 12:11:38 +00008108
8109# There are two separate checks for each of the exact-width integer types we
8110# need. First we check whether the type is available using the usual
8111# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8112# and <stdint.h> where available). We then also use the special type checks of
8113# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8114# directly, #define's uint32_t to be a suitable type.
8115
8116ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8117if test "x$ac_cv_type_uint32_t" = xyes; then :
8118
8119$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8120
8121fi
8122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8124case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008125 no|yes) ;; #(
8126 *)
8127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008129
8130
8131cat >>confdefs.h <<_ACEOF
8132#define uint32_t $ac_cv_c_uint32_t
8133_ACEOF
8134;;
8135 esac
8136
Mark Dickinson983bc162012-12-02 12:11:38 +00008137
8138ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8139if test "x$ac_cv_type_uint64_t" = xyes; then :
8140
8141$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8142
8143fi
8144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8146case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008147 no|yes) ;; #(
8148 *)
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008151
8152
8153cat >>confdefs.h <<_ACEOF
8154#define uint64_t $ac_cv_c_uint64_t
8155_ACEOF
8156;;
8157 esac
8158
Mark Dickinson983bc162012-12-02 12:11:38 +00008159
8160ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8161if test "x$ac_cv_type_int32_t" = xyes; then :
8162
8163$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8164
8165fi
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8168case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008169 no|yes) ;; #(
8170 *)
8171
8172cat >>confdefs.h <<_ACEOF
8173#define int32_t $ac_cv_c_int32_t
8174_ACEOF
8175;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008176esac
8177
Mark Dickinson983bc162012-12-02 12:11:38 +00008178
8179ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8180if test "x$ac_cv_type_int64_t" = xyes; then :
8181
8182$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8183
8184fi
8185
Matthias Kloseb9621712010-04-24 17:59:49 +00008186ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8187case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008188 no|yes) ;; #(
8189 *)
8190
8191cat >>confdefs.h <<_ACEOF
8192#define int64_t $ac_cv_c_int64_t
8193_ACEOF
8194;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008195esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008196
Mark Dickinson983bc162012-12-02 12:11:38 +00008197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200
Matthias Kloseb9621712010-04-24 17:59:49 +00008201$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008202
8203fi
8204
Stefan Krah1919b7e2012-03-21 18:25:23 +01008205ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8206if test "x$ac_cv_type___uint128_t" = xyes; then :
8207
8208$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8209
8210fi
8211
Jack Jansendd19cf82001-12-06 22:36:17 +00008212
Michael W. Hudson54241132001-12-07 15:38:26 +00008213# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008214# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215# The cast to long int works around a bug in the HP C Compiler
8216# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8217# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8218# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8220$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008221if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008223else
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 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 +00008225
Martin v. Löwis11437992002-04-12 09:54:03 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 if test "$ac_cv_type_int" = yes; then
8228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008230as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008231See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232 else
8233 ac_cv_sizeof_int=0
8234 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8239$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240
8241
8242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008245_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008246
8247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248# The cast to long int works around a bug in the HP C Compiler
8249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8251# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8253$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008254if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008256else
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 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 +00008258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259else
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 if test "$ac_cv_type_long" = yes; then
8261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008263as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008264See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 else
8266 ac_cv_sizeof_long=0
8267 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269
Martin v. Löwis11437992002-04-12 09:54:03 +00008270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8272$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273
8274
8275
Martin v. Löwis11437992002-04-12 09:54:03 +00008276cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279
8280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281# The cast to long int works around a bug in the HP C Compiler
8282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8284# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8286$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008287if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008289else
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 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 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292else
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 if test "$ac_cv_type_void_p" = yes; then
8294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008296as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008297See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298 else
8299 ac_cv_sizeof_void_p=0
8300 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302
Martin v. Löwis11437992002-04-12 09:54:03 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8305$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306
8307
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008310#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008311_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008312
8313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314# The cast to long int works around a bug in the HP C Compiler
8315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8317# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8319$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008320if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008322else
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 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 +00008324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 if test "$ac_cv_type_short" = yes; then
8327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008329as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008330See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331 else
8332 ac_cv_sizeof_short=0
8333 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8338$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339
8340
8341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008343#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008345
8346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347# The cast to long int works around a bug in the HP C Compiler
8348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8350# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8352$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008353if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 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 +00008357
Martin v. Löwis11437992002-04-12 09:54:03 +00008358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 if test "$ac_cv_type_float" = yes; then
8360 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008362as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008363See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364 else
8365 ac_cv_sizeof_float=0
8366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8371$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372
8373
8374
Martin v. Löwis11437992002-04-12 09:54:03 +00008375cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008376#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008377_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008378
8379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380# The cast to long int works around a bug in the HP C Compiler
8381# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8382# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8383# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8385$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008386if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 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 +00008390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391else
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 if test "$ac_cv_type_double" = yes; then
8393 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8394$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008395as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008396See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008397 else
8398 ac_cv_sizeof_double=0
8399 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8404$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405
8406
8407
Martin v. Löwis11437992002-04-12 09:54:03 +00008408cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008409#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008410_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008411
8412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413# The cast to long int works around a bug in the HP C Compiler
8414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8416# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8418$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008419if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 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 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424else
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 if test "$ac_cv_type_fpos_t" = yes; then
8426 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008428as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008429See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 else
8431 ac_cv_sizeof_fpos_t=0
8432 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8437$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438
8439
8440
Martin v. Löwis11437992002-04-12 09:54:03 +00008441cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008442#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008443_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008444
Michael W. Hudson54241132001-12-07 15:38:26 +00008445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446# The cast to long int works around a bug in the HP C Compiler
8447# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8448# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8449# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8451$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 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 +00008456
Martin v. Löwis18e16552006-02-15 17:27:45 +00008457else
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 if test "$ac_cv_type_size_t" = yes; then
8459 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008461as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008462See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463 else
8464 ac_cv_sizeof_size_t=0
8465 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467
Martin v. Löwis18e16552006-02-15 17:27:45 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8470$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471
8472
8473
Martin v. Löwis18e16552006-02-15 17:27:45 +00008474cat >>confdefs.h <<_ACEOF
8475#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8476_ACEOF
8477
8478
Christian Heimes400adb02008-02-01 08:12:03 +00008479# The cast to long int works around a bug in the HP C Compiler
8480# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8481# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8482# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8484$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008485if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 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 +00008489
Christian Heimes400adb02008-02-01 08:12:03 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 if test "$ac_cv_type_pid_t" = yes; then
8492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008494as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008495See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008496 else
8497 ac_cv_sizeof_pid_t=0
8498 fi
8499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500
Christian Heimes400adb02008-02-01 08:12:03 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8503$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008504
8505
8506
8507cat >>confdefs.h <<_ACEOF
8508#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8509_ACEOF
8510
8511
Michael W. Hudson54241132001-12-07 15:38:26 +00008512
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8514$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008515have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008522long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528
8529
Matthias Kloseb9621712010-04-24 17:59:49 +00008530$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008532 have_long_long=yes
8533
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8537$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008538if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539# The cast to long int works around a bug in the HP C Compiler
8540# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8541# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8542# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8544$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008545if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 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 +00008549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 if test "$ac_cv_type_long_long" = yes; then
8552 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008554as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008555See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 else
8557 ac_cv_sizeof_long_long=0
8558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8563$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564
8565
8566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008568#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008569_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570
Michael W. Hudson54241132001-12-07 15:38:26 +00008571
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008572fi
8573
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8575$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008576have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008578/* end confdefs.h. */
8579
8580int
8581main ()
8582{
8583long double x; x = (long double)0;
8584 ;
8585 return 0;
8586}
8587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008588if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008589
8590
Matthias Kloseb9621712010-04-24 17:59:49 +00008591$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008592
8593 have_long_double=yes
8594
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008595fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8598$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008599if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8605$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008606if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 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 +00008610
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008611else
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 if test "$ac_cv_type_long_double" = yes; then
8613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008615as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008616See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617 else
8618 ac_cv_sizeof_long_double=0
8619 fi
8620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8624$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008625
8626
8627
8628cat >>confdefs.h <<_ACEOF
8629#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8630_ACEOF
8631
8632
8633fi
8634
8635
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8637$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008638have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008640/* end confdefs.h. */
8641
8642int
8643main ()
8644{
8645_Bool x; x = (_Bool)0;
8646 ;
8647 return 0;
8648}
8649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008650if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008651
8652
Matthias Kloseb9621712010-04-24 17:59:49 +00008653$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008654
8655 have_c99_bool=yes
8656
Thomas Woutersb2137042007-02-01 18:02:27 +00008657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8660$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008661if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662# The cast to long int works around a bug in the HP C Compiler
8663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8667$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008668if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 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 +00008672
Thomas Woutersb2137042007-02-01 18:02:27 +00008673else
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 if test "$ac_cv_type__Bool" = yes; then
8675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008677as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008678See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 else
8680 ac_cv_sizeof__Bool=0
8681 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683
Thomas Woutersb2137042007-02-01 18:02:27 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8686$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687
8688
8689
Thomas Woutersb2137042007-02-01 18:02:27 +00008690cat >>confdefs.h <<_ACEOF
8691#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8692_ACEOF
8693
8694
8695fi
8696
Matthias Kloseb9621712010-04-24 17:59:49 +00008697ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008698 #include <stdint.h>
8699 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008700 #ifdef HAVE_INTTYPES_H
8701 #include <inttypes.h>
8702 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008703"
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008705
8706cat >>confdefs.h <<_ACEOF
8707#define HAVE_UINTPTR_T 1
8708_ACEOF
8709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710# The cast to long int works around a bug in the HP C Compiler
8711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8713# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8715$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008716if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008718else
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 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 +00008720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 if test "$ac_cv_type_uintptr_t" = yes; then
8723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008725as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008726See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727 else
8728 ac_cv_sizeof_uintptr_t=0
8729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8734$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735
8736
8737
Martin v. Löwis11437992002-04-12 09:54:03 +00008738cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008739#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008740_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008741
Michael W. Hudson54241132001-12-07 15:38:26 +00008742
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008743fi
8744
Thomas Wouters89f507f2006-12-13 04:49:30 +00008745
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008746# The cast to long int works around a bug in the HP C Compiler
8747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8749# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8751$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008752if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754else
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008756#ifdef HAVE_SYS_TYPES_H
8757#include <sys/types.h>
8758#endif
8759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008761
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 if test "$ac_cv_type_off_t" = yes; then
8764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008766as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008767See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008768 else
8769 ac_cv_sizeof_off_t=0
8770 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008772
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8775$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008777
8778
Martin v. Löwis11437992002-04-12 09:54:03 +00008779cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008780#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008781_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008782
Michael W. Hudson54241132001-12-07 15:38:26 +00008783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8786$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008787if test "$have_long_long" = yes
8788then
8789if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008790 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008793
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8795$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008796else
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008799fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008803fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805# The cast to long int works around a bug in the HP C Compiler
8806# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8807# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8808# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8810$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008811if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008815#ifdef HAVE_SYS_TYPES_H
8816#include <sys/types.h>
8817#endif
8818#ifdef HAVE_TIME_H
8819#include <time.h>
8820#endif
8821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008823
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 if test "$ac_cv_type_time_t" = yes; then
8826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008828as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008829See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830 else
8831 ac_cv_sizeof_time_t=0
8832 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008834
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8837$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008838
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839
8840
Martin v. Löwis11437992002-04-12 09:54:03 +00008841cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008842#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008843_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008844
Michael W. Hudson54241132001-12-07 15:38:26 +00008845
8846
Trent Mick635f6fb2000-08-23 21:33:05 +00008847# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008848ac_save_cc="$CC"
8849if test "$ac_cv_kpthread" = "yes"
8850then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008851elif test "$ac_cv_kthread" = "yes"
8852then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008853elif test "$ac_cv_pthread" = "yes"
8854then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008855fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8858$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008859have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008861/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008862
8863 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
8866{
Guido van Rossum12580492000-09-24 16:47:19 +00008867pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ;
8869 return 0;
8870}
Matthias Kloseb159a552010-04-25 21:00:44 +00008871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008873if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008874 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8878$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008879if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8883# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8885$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008886if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890#ifdef HAVE_PTHREAD_H
8891#include <pthread.h>
8892#endif
8893
Matthias Kloseb9621712010-04-24 17:59:49 +00008894"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008896else
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 if test "$ac_cv_type_pthread_t" = yes; then
8898 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008900as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008901See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902 else
8903 ac_cv_sizeof_pthread_t=0
8904 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008906
Trent Mick635f6fb2000-08-23 21:33:05 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8909$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911
8912
Martin v. Löwis11437992002-04-12 09:54:03 +00008913cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008914#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008915_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917
Trent Mick635f6fb2000-08-23 21:33:05 +00008918fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008919CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008920
Michael W. Hudson54241132001-12-07 15:38:26 +00008921
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008922case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008923 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008924 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8925 ;;
8926 Darwin/*)
8927 OTHER_LIBTOOL_OPT=""
8928 ;;
8929esac
8930
8931
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008932
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008933case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008934 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008935 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8936 if test "${enable_universalsdk}"; then
8937 :
8938 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008939 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008940 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008941 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008942 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008943 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008944 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008945 if test ${gcc_version} '<' 4.0
8946 then
8947 LIBTOOL_CRUFT="-lcc_dynamic"
8948 else
8949 LIBTOOL_CRUFT=""
8950 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008952 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008953else
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008955/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008956
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008957 #include <unistd.h>
8958 int main(int argc, char*argv[])
8959 {
8960 if (sizeof(long) == 4) {
8961 return 0;
8962 } else {
8963 return 1;
8964 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008965 }
8966
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008968if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008969 ac_osx_32bit=yes
8970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975fi
8976
8977
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008979 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008980 i386)
8981 MACOSX_DEFAULT_ARCH="i386"
8982 ;;
8983 ppc)
8984 MACOSX_DEFAULT_ARCH="ppc"
8985 ;;
8986 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008987 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008988 ;;
8989 esac
8990 else
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="x86_64"
8994 ;;
8995 ppc)
8996 MACOSX_DEFAULT_ARCH="ppc64"
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
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009003 fi
9004
9005 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009006 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009007 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009008esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9010$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009011if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009012then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009013 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009015 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009016
Matthias Kloseb9621712010-04-24 17:59:49 +00009017$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009018
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9020$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009021 if test $enable_shared = "yes"
9022 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009023 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 +00009024 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009025else
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9027$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009028fi
9029
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9031$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009032case $ac_sys_system/$ac_sys_release in
9033 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009036
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9038$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009039 ;;
9040 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9042$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009043 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009044esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009045
Guido van Rossum0a516c91994-09-12 10:58:40 +00009046# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009047
Michael W. Hudson54241132001-12-07 15:38:26 +00009048
9049
9050
9051
Benjamin Peterson99f03762010-04-11 22:15:28 +00009052
Thomas Wouters477c8d52006-05-27 19:21:47 +00009053
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009054# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9055# -- usually .so, .sl on HP-UX, .dll on Cygwin
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9057$as_echo_n "checking the extension of shared libraries... " >&6; }
9058if test -z "$SHLIB_SUFFIX"; then
9059 case $ac_sys_system in
9060 hp*|HP*)
9061 case `uname -m` in
9062 ia64) SHLIB_SUFFIX=.so;;
9063 *) SHLIB_SUFFIX=.sl;;
9064 esac
9065 ;;
9066 CYGWIN*) SHLIB_SUFFIX=.dll;;
9067 *) SHLIB_SUFFIX=.so;;
9068 esac
9069fi
9070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9071$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009072
Guido van Rossum0a516c91994-09-12 10:58:40 +00009073# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009074# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009075# (Shared libraries in this instance are shared modules to be loaded into
9076# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9078$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009079if test -z "$LDSHARED"
9080then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009081 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009082 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009083 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009084 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009085 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009086 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009087 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009089 if test "$GCC" = "yes" ; then
9090 LDSHARED='$(CC) -shared'
9091 LDCXXSHARED='$(CXX) -shared'
9092 else
9093 LDSHARED='$(CC) -G'
9094 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009095 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009096 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009097 if test "$GCC" = "yes" ; then
9098 LDSHARED='$(CC) -shared'
9099 LDCXXSHARED='$(CXX) -shared'
9100 else
9101 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009102 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009103 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009104 LDSHARED='$(CC) -bundle'
9105 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009106 if test "$enable_framework" ; then
9107 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009108 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9109 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009110 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009111 else
9112 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009113 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009114 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009115 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009116 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009117 LDSHARED='$(CC) -bundle'
9118 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009119 if test "$enable_framework" ; then
9120 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009121 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9122 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009123 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009124 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009125 # No framework, use the Python app as bundle-loader
9126 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009127 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009128 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009129 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009130 Darwin/*)
9131 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9132 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009133
Ned Deily36820b62014-06-25 13:44:22 -07009134 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9135 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9136 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9137 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9138 if test ${dep_target_major} -eq 10 && \
9139 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009140 then
Ned Deily36820b62014-06-25 13:44:22 -07009141 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009142 LDSHARED='$(CC) -bundle'
9143 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009144 if test "$enable_framework" ; then
9145 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009146 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9147 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009148 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009149 else
9150 # No framework, use the Python app as bundle-loader
9151 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9152 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009153 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009154 fi
Ned Deily36820b62014-06-25 13:44:22 -07009155 else
9156 # building for OS X 10.3 and later
9157 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9158 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9159 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009160 fi
9161 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 Linux*|GNU*|QNX*)
9163 LDSHARED='$(CC) -shared'
9164 LDCXXSHARED='$(CXX) -shared';;
9165 BSD/OS*/4*)
9166 LDSHARED="gcc -shared"
9167 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009168 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009169 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009170 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009171 LDSHARED='$(CC) -shared'
9172 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009173 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009174 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009175 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009176 OpenBSD*)
9177 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9178 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009179 LDSHARED='$(CC) -shared $(CCSHARED)'
9180 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009181 else
9182 case `uname -r` in
9183 [01].* | 2.[0-7] | 2.[0-7].*)
9184 LDSHARED="ld -Bshareable ${LDFLAGS}"
9185 ;;
9186 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009187 LDSHARED='$(CC) -shared $(CCSHARED)'
9188 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009189 ;;
9190 esac
9191 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009195 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 if test "$GCC" = "yes" ; then
9197 LDSHARED='$(CC) -shared'
9198 LDCXXSHARED='$(CXX) -shared'
9199 else
9200 LDSHARED='$(CC) -G'
9201 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009202 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009203 SCO_SV*)
9204 LDSHARED='$(CC) -Wl,-G,-Bexport'
9205 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9206 CYGWIN*)
9207 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9208 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009209 *) LDSHARED="ld";;
9210 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9213$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009215BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009216# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009217# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9219$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009220if test -z "$CCSHARED"
9221then
Guido van Rossum07397971997-04-29 21:49:50 +00009222 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009223 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009224 then CCSHARED="-fPIC";
9225 elif test `uname -p` = sparc;
9226 then CCSHARED="-xcode=pic32";
9227 else CCSHARED="-Kpic";
9228 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009229 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009230 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009231 else CCSHARED="+z";
9232 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009233 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009234 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009235 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009236 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009237 if test "$GCC" = "yes"
9238 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009239 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009240 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009241 SCO_SV*)
9242 if test "$GCC" = "yes"
9243 then CCSHARED="-fPIC"
9244 else CCSHARED="-Kpic -belf"
9245 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009246 IRIX*/6*) case $CC in
9247 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009248 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009249 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009250 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9253$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009255# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9257$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009258if test -z "$LINKFORSHARED"
9259then
Guido van Rossum07397971997-04-29 21:49:50 +00009260 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009261 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009262 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009263 LINKFORSHARED="-Wl,-E -Wl,+s";;
9264# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009265 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009266 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009269 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009270
9271 # Issue #18075: the default maximum stack size (8MBytes) is too
9272 # small for the default recursion limit. Increase the stack size
9273 # to ensure that tests don't crash
9274 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9275
Jack Jansene578a632001-08-15 01:27:14 +00009276 if test "$enable_framework"
9277 then
Jack Jansenda49e192005-01-07 13:08:22 +00009278 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009279 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009280 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009281 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009282 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009283 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009284 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009285 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9286 then
9287 LINKFORSHARED="-Wl,--export-dynamic"
9288 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009289 SunOS/5*) case $CC in
9290 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009291 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009292 then
9293 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009294 fi;;
9295 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009296 CYGWIN*)
9297 if test $enable_shared = "no"
9298 then
9299 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9300 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009301 QNX*)
9302 # -Wl,-E causes the symbols to be added to the dynamic
9303 # symbol table so that they can be found when a module
9304 # is loaded. -N 2048K causes the stack size to be set
9305 # to 2048 kilobytes so that the stack doesn't overflow
9306 # when running test_compile.py.
9307 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009308 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9311$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312
Michael W. Hudson54241132001-12-07 15:38:26 +00009313
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009314
Matthias Kloseb9621712010-04-24 17:59:49 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9316$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009317if test ! "$LIBRARY" = "$LDLIBRARY"
9318then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009319 case $ac_sys_system in
9320 CYGWIN*)
9321 # Cygwin needs CCSHARED when building extension DLLs
9322 # but not when building the interpreter DLL.
9323 CFLAGSFORSHARED='';;
9324 *)
9325 CFLAGSFORSHARED='$(CCSHARED)'
9326 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9329$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009330
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009331# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9332# library (with --enable-shared).
9333# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009334# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9335# if it is not required, since it creates a dependency of the shared library
9336# to LIBS. This, in turn, means that applications linking the shared libpython
9337# don't need to link LIBS explicitly. The default should be only changed
9338# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9341$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009342case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009343 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009344 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009345esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9347$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009348
9349
Guido van Rossum627b2d71993-12-24 10:39:16 +00009350# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9352$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009353if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009354 $as_echo_n "(cached) " >&6
9355else
9356 ac_check_lib_save_LIBS=$LIBS
9357LIBS="-lsendfile $LIBS"
9358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9359/* end confdefs.h. */
9360
9361/* Override any GCC internal prototype to avoid an error.
9362 Use char because int might match the return type of a GCC
9363 builtin and then its argument prototype would still apply. */
9364#ifdef __cplusplus
9365extern "C"
9366#endif
9367char sendfile ();
9368int
9369main ()
9370{
9371return sendfile ();
9372 ;
9373 return 0;
9374}
9375_ACEOF
9376if ac_fn_c_try_link "$LINENO"; then :
9377 ac_cv_lib_sendfile_sendfile=yes
9378else
9379 ac_cv_lib_sendfile_sendfile=no
9380fi
9381rm -f core conftest.err conftest.$ac_objext \
9382 conftest$ac_exeext conftest.$ac_ext
9383LIBS=$ac_check_lib_save_LIBS
9384fi
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9386$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009387if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009388 cat >>confdefs.h <<_ACEOF
9389#define HAVE_LIBSENDFILE 1
9390_ACEOF
9391
9392 LIBS="-lsendfile $LIBS"
9393
9394fi
9395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9397$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009398if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009400else
Martin v. Löwis11437992002-04-12 09:54:03 +00009401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009402LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406/* Override any GCC internal prototype to avoid an error.
9407 Use char because int might match the return type of a GCC
9408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409#ifdef __cplusplus
9410extern "C"
9411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009412char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009413int
9414main ()
9415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ;
9418 return 0;
9419}
9420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009423else
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009426rm -f core conftest.err conftest.$ac_objext \
9427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9431$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009432if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 cat >>confdefs.h <<_ACEOF
9434#define HAVE_LIBDL 1
9435_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009437 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009439fi
9440 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9442$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009443if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009445else
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009447LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451/* Override any GCC internal prototype to avoid an error.
9452 Use char because int might match the return type of a GCC
9453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009454#ifdef __cplusplus
9455extern "C"
9456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009457char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009458int
9459main ()
9460{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 ;
9463 return 0;
9464}
9465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009466if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009471rm -f core conftest.err conftest.$ac_objext \
9472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009473LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9476$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009477if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 cat >>confdefs.h <<_ACEOF
9479#define HAVE_LIBDLD 1
9480_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009481
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009482 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009483
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009484fi
9485 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009486
Georg Brandlb1441c72009-01-03 22:33:39 +00009487# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009488if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9490$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009491if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009493else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009494 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498/* Override any GCC internal prototype to avoid an error.
9499 Use char because int might match the return type of a GCC
9500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501#ifdef __cplusplus
9502extern "C"
9503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009504char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009505int
9506main ()
9507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ;
9510 return 0;
9511}
9512_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513for ac_lib in '' pthread rt posix4; do
9514 if test -z "$ac_lib"; then
9515 ac_res="none required"
9516 else
9517 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009518 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009525 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528done
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531else
9532 ac_cv_search_sem_init=no
9533fi
9534rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009535LIBS=$ac_func_search_save_LIBS
9536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9538$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009540if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009542
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009543fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009544 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009545 # posix4 on Solaris 2.6
9546 # pthread (first!) on Linux
9547fi
9548
Martin v. Löwis19d17342003-06-14 21:03:05 +00009549# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9551$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009554else
9555 ac_check_lib_save_LIBS=$LIBS
9556LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009558/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560/* Override any GCC internal prototype to avoid an error.
9561 Use char because int might match the return type of a GCC
9562 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009563#ifdef __cplusplus
9564extern "C"
9565#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009566char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009567int
9568main ()
9569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009576 ac_cv_lib_intl_textdomain=yes
9577else
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580rm -f core conftest.err conftest.$ac_objext \
9581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009582LIBS=$ac_check_lib_save_LIBS
9583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9585$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009586if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009589
Brett Cannonc6d936e2009-06-07 20:09:53 +00009590 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009591fi
9592
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009593
9594# checks for system dependent C++ extensions support
9595case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9597$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009600
Georg Brandl59e87bd2011-02-15 19:48:59 +00009601 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009602int
9603main ()
9604{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009605loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ;
9607 return 0;
9608}
Matthias Kloseb159a552010-04-25 21:00:44 +00009609
Martin v. Löwis11437992002-04-12 09:54:03 +00009610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009611if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009612
Matthias Kloseb159a552010-04-25 21:00:44 +00009613
Matthias Kloseb9621712010-04-24 17:59:49 +00009614$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009615
Matthias Kloseb159a552010-04-25 21:00:44 +00009616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009617$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009618
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009619else
Matthias Kloseb159a552010-04-25 21:00:44 +00009620
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009622$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009623
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625rm -f core conftest.err conftest.$ac_objext \
9626 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009627 *) ;;
9628esac
9629
Christian Heimes985ecdc2013-11-20 11:46:18 +01009630# check for systems that require aligned memory access
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9632$as_echo_n "checking aligned memory access is required... " >&6; }
9633if test "$cross_compiling" = yes; then :
9634 aligned_required=yes
9635else
9636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9637/* end confdefs.h. */
9638
9639int main()
9640{
9641 char s[16];
9642 int i, *p1, *p2;
9643 for (i=0; i < 16; i++)
9644 s[i] = i;
9645 p1 = (int*)(s+1);
9646 p2 = (int*)(s+2);
9647 if (*p1 == *p2)
9648 return 1;
9649 return 0;
9650}
9651
9652_ACEOF
9653if ac_fn_c_try_run "$LINENO"; then :
9654 aligned_required=no
9655else
9656 aligned_required=yes
9657fi
9658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9659 conftest.$ac_objext conftest.beam conftest.$ac_ext
9660fi
9661
9662
9663if test "$aligned_required" = yes ; then
9664
9665$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9666
9667fi
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9669$as_echo "$aligned_required" >&6; }
9670
9671
9672# str, bytes and memoryview hash algorithm
9673
9674
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9676$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9677
9678# Check whether --with-hash_algorithm was given.
9679if test "${with_hash_algorithm+set}" = set; then :
9680 withval=$with_hash_algorithm;
9681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9682$as_echo "$withval" >&6; }
9683case "$withval" in
9684 siphash24)
9685 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9686
9687 ;;
9688 fnv)
9689 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9690
9691 ;;
9692 *)
9693 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9694 ;;
9695esac
9696
9697else
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9699$as_echo "default" >&6; }
9700fi
9701
9702
Charles-François Natalid30b0222014-05-08 23:08:51 +01009703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9704$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9705
9706# Check whether --with-address_sanitizer was given.
9707if test "${with_address_sanitizer+set}" = set; then :
9708 withval=$with_address_sanitizer;
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9710$as_echo "$withval" >&6; }
9711BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9712LDFLAGS="-fsanitize=address $LDFLAGS"
9713
9714else
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717fi
9718
9719
Guido van Rossum70c7f481998-03-26 18:44:10 +00009720# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9722$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009723if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009725else
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009727LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731/* Override any GCC internal prototype to avoid an error.
9732 Use char because int might match the return type of a GCC
9733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009734#ifdef __cplusplus
9735extern "C"
9736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009737char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009738int
9739main ()
9740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ;
9743 return 0;
9744}
9745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009748else
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009751rm -f core conftest.err conftest.$ac_objext \
9752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009753LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9756$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009757if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009758 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009759fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009760 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9762$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009765else
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009767LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771/* Override any GCC internal prototype to avoid an error.
9772 Use char because int might match the return type of a GCC
9773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774#ifdef __cplusplus
9775extern "C"
9776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009777char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009778int
9779main ()
9780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ;
9783 return 0;
9784}
9785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009791rm -f core conftest.err conftest.$ac_objext \
9792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9796$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009797if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009798 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009799fi
9800 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009801
Matthias Kloseb9621712010-04-24 17:59:49 +00009802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9803$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009806if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009807 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9809$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009810LIBS="$withval $LIBS"
9811
9812else
Matthias Kloseb9621712010-04-24 17:59:49 +00009813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815fi
9816
Guido van Rossum7f43da71994-08-01 12:15:30 +00009817
Victor Stinner8291b5e2015-03-20 16:03:14 +01009818
9819
9820
9821
9822
9823
9824
9825if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9826 if test -n "$ac_tool_prefix"; then
9827 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9828set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9830$as_echo_n "checking for $ac_word... " >&6; }
9831if ${ac_cv_path_PKG_CONFIG+:} false; then :
9832 $as_echo_n "(cached) " >&6
9833else
9834 case $PKG_CONFIG in
9835 [\\/]* | ?:[\\/]*)
9836 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9837 ;;
9838 *)
9839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9840for as_dir in $PATH
9841do
9842 IFS=$as_save_IFS
9843 test -z "$as_dir" && as_dir=.
9844 for ac_exec_ext in '' $ac_executable_extensions; do
9845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9846 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9848 break 2
9849 fi
9850done
9851 done
9852IFS=$as_save_IFS
9853
9854 ;;
9855esac
9856fi
9857PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9858if test -n "$PKG_CONFIG"; then
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9860$as_echo "$PKG_CONFIG" >&6; }
9861else
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864fi
9865
9866
9867fi
9868if test -z "$ac_cv_path_PKG_CONFIG"; then
9869 ac_pt_PKG_CONFIG=$PKG_CONFIG
9870 # Extract the first word of "pkg-config", so it can be a program name with args.
9871set dummy pkg-config; ac_word=$2
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9873$as_echo_n "checking for $ac_word... " >&6; }
9874if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9875 $as_echo_n "(cached) " >&6
9876else
9877 case $ac_pt_PKG_CONFIG in
9878 [\\/]* | ?:[\\/]*)
9879 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9880 ;;
9881 *)
9882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9883for as_dir in $PATH
9884do
9885 IFS=$as_save_IFS
9886 test -z "$as_dir" && as_dir=.
9887 for ac_exec_ext in '' $ac_executable_extensions; do
9888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9889 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9891 break 2
9892 fi
9893done
9894 done
9895IFS=$as_save_IFS
9896
9897 ;;
9898esac
9899fi
9900ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9901if test -n "$ac_pt_PKG_CONFIG"; then
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9903$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9904else
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906$as_echo "no" >&6; }
9907fi
9908
9909 if test "x$ac_pt_PKG_CONFIG" = x; then
9910 PKG_CONFIG=""
9911 else
9912 case $cross_compiling:$ac_tool_warned in
9913yes:)
9914{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9915$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9916ac_tool_warned=yes ;;
9917esac
9918 PKG_CONFIG=$ac_pt_PKG_CONFIG
9919 fi
9920else
9921 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9922fi
9923
9924fi
9925if test -n "$PKG_CONFIG"; then
9926 _pkg_min_version=0.9.0
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9928$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9929 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9931$as_echo "yes" >&6; }
9932 else
9933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9934$as_echo "no" >&6; }
9935 PKG_CONFIG=""
9936 fi
9937fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009938
9939# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9941$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009942
9943# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009944if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009945 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009946else
9947 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009948fi
9949
9950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9952$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009953
9954# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9956$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009957
9958# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009960 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009961else
9962 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009963fi
9964
9965
9966if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009967 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9968else
9969 LIBFFI_INCLUDEDIR=""
9970fi
9971
9972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9974$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009975
Stefan Krah60187b52012-03-23 19:06:27 +01009976# Check for use of the system libmpdec library
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9978$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9979
9980# Check whether --with-system_libmpdec was given.
9981if test "${with_system_libmpdec+set}" = set; then :
9982 withval=$with_system_libmpdec;
9983else
9984 with_system_libmpdec="no"
9985fi
9986
9987
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9989$as_echo "$with_system_libmpdec" >&6; }
9990
Benjamin Peterson076ed002010-10-31 17:11:02 +00009991# Check for support for loadable sqlite extensions
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9993$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9994# Check whether --enable-loadable-sqlite-extensions was given.
9995if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9996 enableval=$enable_loadable_sqlite_extensions;
9997else
9998 enable_loadable_sqlite_extensions="no"
9999fi
10000
10001
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10003$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10004
Ned Deilyd819b932013-09-06 01:07:05 -070010005# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10006
10007
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10009$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10010
10011# Check whether --with-tcltk-includes was given.
10012if test "${with_tcltk_includes+set}" = set; then :
10013 withval=$with_tcltk_includes;
10014else
10015 with_tcltk_includes="default"
10016fi
10017
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10019$as_echo "$with_tcltk_includes" >&6; }
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10021$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10022
10023# Check whether --with-tcltk-libs was given.
10024if test "${with_tcltk_libs+set}" = set; then :
10025 withval=$with_tcltk_libs;
10026else
10027 with_tcltk_libs="default"
10028fi
10029
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10031$as_echo "$with_tcltk_libs" >&6; }
10032if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10033then
10034 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10035 then
10036 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10037 fi
10038 TCLTK_INCLUDES=""
10039 TCLTK_LIBS=""
10040else
10041 TCLTK_INCLUDES="$with_tcltk_includes"
10042 TCLTK_LIBS="$with_tcltk_libs"
10043fi
10044
Matthias Klose55708cc2009-04-30 08:06:49 +000010045# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10047$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010048
10049# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010050if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010051 withval=$with_dbmliborder;
10052if test x$with_dbmliborder = xyes
10053then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010054as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010055else
10056 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10057 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10058 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010059 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010060 fi
10061 done
10062fi
10063fi
10064
Matthias Kloseb9621712010-04-24 17:59:49 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10066$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010067
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010068# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010069
10070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10072$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010075if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010076 withval=$with_signal_module;
10077fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010078
10079
10080if test -z "$with_signal_module"
10081then with_signal_module="yes"
10082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10084$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010085
10086if test "${with_signal_module}" = "yes"; then
10087 USE_SIGNAL_MODULE=""
10088 SIGNAL_OBJS=""
10089else
10090 USE_SIGNAL_MODULE="#"
10091 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10092fi
10093
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010094# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010095
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010096USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098
Martin v. Löwis11437992002-04-12 09:54:03 +000010099
10100# Templates for things AC_DEFINEd more than once.
10101# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010102
10103
Martin v. Löwis11437992002-04-12 09:54:03 +000010104
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10106$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010109if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110 withval=$with_threads;
10111fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010112
10113
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010114# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 withval=$with_thread; with_threads=$with_thread
10119fi
10120
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010121
10122if test -z "$with_threads"
10123then with_threads="yes"
10124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10126$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010127
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010128
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010129if test "$with_threads" = "no"
10130then
10131 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010132elif test "$ac_cv_pthread_is_default" = yes
10133then
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010135
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010136 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010138
10139 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010141elif test "$ac_cv_kpthread" = "yes"
10142then
10143 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010144 if test "$ac_cv_cxx_thread" = "yes"; then
10145 CXX="$CXX -Kpthread"
10146 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010148
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010149 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010150 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010151elif test "$ac_cv_kthread" = "yes"
10152then
10153 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010154 if test "$ac_cv_cxx_thread" = "yes"; then
10155 CXX="$CXX -Kthread"
10156 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010158
10159 posix_threads=yes
10160 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010161elif test "$ac_cv_pthread" = "yes"
10162then
10163 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010164 if test "$ac_cv_cxx_thread" = "yes"; then
10165 CXX="$CXX -pthread"
10166 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010168
10169 posix_threads=yes
10170 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171else
10172 if test ! -z "$with_threads" -a -d "$with_threads"
10173 then LDFLAGS="$LDFLAGS -L$with_threads"
10174 fi
10175 if test ! -z "$withval" -a -d "$withval"
10176 then LDFLAGS="$LDFLAGS -L$withval"
10177 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010178
10179 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010180 # define _POSIX_THREADS in unistd.h. Some apparently don't
10181 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10183$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010185/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010186
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010187#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010188#ifdef _POSIX_THREADS
10189yes
10190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
10192_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010195 unistd_defines_pthreads=yes
10196else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010197 unistd_defines_pthreads=no
10198fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010199rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010200
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10202$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010203
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010205
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010206 # Just looking for pthread_create in libpthread is not enough:
10207 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10208 # So we really have to include pthread.h, and then link.
10209 _libs=$LIBS
10210 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10212$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010214/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010215
10216#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010217#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010218
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010219void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010220int
10221main ()
10222{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010223
10224pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ;
10226 return 0;
10227}
10228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10232$as_echo "yes" >&6; }
10233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010234
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010236 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010237else
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010239 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010243
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010245 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010246else
Guido van Rossumad678af1998-10-02 14:42:15 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10249$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010250if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010252else
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010254LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258/* Override any GCC internal prototype to avoid an error.
10259 Use char because int might match the return type of a GCC
10260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010261#ifdef __cplusplus
10262extern "C"
10263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010264char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010265int
10266main ()
10267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010275else
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010278rm -f core conftest.err conftest.$ac_objext \
10279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010280LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10283$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010284if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010286
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010287 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010288 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010289 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010290else
Greg Steinadf63d62000-07-05 10:38:09 +000010291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10293$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010294if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010296else
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010298LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302/* Override any GCC internal prototype to avoid an error.
10303 Use char because int might match the return type of a GCC
10304 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010305#ifdef __cplusplus
10306extern "C"
10307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010308char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010309int
10310main ()
10311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 ;
10314 return 0;
10315}
10316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010319else
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010322rm -f core conftest.err conftest.$ac_objext \
10323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010324LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10327$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010328if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010331 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010332 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010333 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010334else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010335
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10337$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010338if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010340else
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010342LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346/* Override any GCC internal prototype to avoid an error.
10347 Use char because int might match the return type of a GCC
10348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349#ifdef __cplusplus
10350extern "C"
10351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010352char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010353int
10354main ()
10355{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010363else
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010366rm -f core conftest.err conftest.$ac_objext \
10367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10371$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010372if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010374
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010375 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010376 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010377 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10381$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010382if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010384else
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010386LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390/* Override any GCC internal prototype to avoid an error.
10391 Use char because int might match the return type of a GCC
10392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010393#ifdef __cplusplus
10394extern "C"
10395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010396char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010397int
10398main ()
10399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 ;
10402 return 0;
10403}
10404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010405if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010407else
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010410rm -f core conftest.err conftest.$ac_objext \
10411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010412LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10415$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010416if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010419 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010420 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010421 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010422else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010423
Martin v. Löwis130fb172001-07-19 11:00:41 +000010424 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010425fi
10426
Guido van Rossum627b2d71993-12-24 10:39:16 +000010427
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010428fi
10429
Guido van Rossum0be3e491997-05-22 20:33:33 +000010430fi
10431
Guido van Rossum49545951997-12-02 19:28:29 +000010432fi
10433
Guido van Rossumb93a8621998-05-07 13:27:32 +000010434fi
10435
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010437rm -f core conftest.err conftest.$ac_objext \
10438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010439
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10441$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010442if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010444else
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010446LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450/* Override any GCC internal prototype to avoid an error.
10451 Use char because int might match the return type of a GCC
10452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010453#ifdef __cplusplus
10454extern "C"
10455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010456char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010457int
10458main ()
10459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ;
10462 return 0;
10463}
10464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010467else
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010470rm -f core conftest.err conftest.$ac_objext \
10471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010472LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10475$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010476if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010478
Martin v. Löwis130fb172001-07-19 11:00:41 +000010479 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010480 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010481 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010482fi
10483
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010484
Neal Norwitza978ab02002-11-02 16:58:05 +000010485 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10487$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010488if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010490else
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010492LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496/* Override any GCC internal prototype to avoid an error.
10497 Use char because int might match the return type of a GCC
10498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010499#ifdef __cplusplus
10500extern "C"
10501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010502char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503int
10504main ()
10505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ;
10508 return 0;
10509}
10510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010513else
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10521$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010522if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010524
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010525 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010526 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010527 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010528fi
10529
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010530 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010532
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533if test "$posix_threads" = "yes"; then
10534 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010537
10538 fi
10539
10540 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10541 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010542 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010544
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545 ;;
10546 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010547$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548
10549 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010550 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010551$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010552
10553 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 esac
10555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10557$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010558 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560else
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010562 ac_cv_pthread_system_supported=no
10563else
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010566
10567 #include <stdio.h>
10568 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569 void *foo(void *parm) {
10570 return NULL;
10571 }
10572 main() {
10573 pthread_attr_t attr;
10574 pthread_t id;
10575 if (pthread_attr_init(&attr)) exit(-1);
10576 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10577 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10578 exit(0);
10579 }
10580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582 ac_cv_pthread_system_supported=yes
10583else
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010588fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591fi
10592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10594$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595 if test "$ac_cv_pthread_system_supported" = "yes"; then
10596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010598
10599 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 for ac_func in pthread_sigmask
10601do :
10602 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010603if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010607 case $ac_sys_system in
10608 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010611
10612 ;;
10613 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010614fi
10615done
10616
Christian Heimesf77b4b22013-08-21 13:26:05 +020010617 for ac_func in pthread_atfork
10618do :
10619 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10620if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10621 cat >>confdefs.h <<_ACEOF
10622#define HAVE_PTHREAD_ATFORK 1
10623_ACEOF
10624
10625fi
10626done
10627
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628fi
10629
10630
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010631# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010632
Matthias Kloseb9621712010-04-24 17:59:49 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10634$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010636if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641 ipv6=no
10642 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10644$as_echo "yes" >&6; }
10645 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646
10647 ipv6=yes
10648 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010653/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654 /* AF_INET6 available check */
10655#include <sys/types.h>
10656#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010657int
10658main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010660int domain = AF_INET6;
10661 ;
10662 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663}
Martin v. Löwis11437992002-04-12 09:54:03 +000010664_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010665if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10668$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010670
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671else
Matthias Kloseb159a552010-04-25 21:00:44 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010676
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010677fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010680if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10682$as_echo_n "checking if RFC2553 API is available... " >&6; }
10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010684/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010685
10686 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010687#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010688int
10689main ()
10690{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010691struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010692 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ;
10694 return 0;
10695}
Matthias Kloseb159a552010-04-25 21:00:44 +000010696
Martin v. Löwis11437992002-04-12 09:54:03 +000010697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010698if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010699
10700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010702 ipv6=yes
10703
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010704else
Matthias Kloseb159a552010-04-25 21:00:44 +000010705
10706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010708 ipv6=no
10709
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010712fi
10713
10714if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010716
10717fi
10718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719fi
10720
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010721
10722ipv6type=unknown
10723ipv6lib=none
10724ipv6trylibc=no
10725
10726if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10728$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010729 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10730 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731 case $i in
10732 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010735
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736#include <netinet/in.h>
10737#ifdef IPV6_INRIA_VERSION
10738yes
10739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010740_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010743 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010745rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746
10747 ;;
10748 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752#include <netinet/in.h>
10753#ifdef __KAME__
10754yes
10755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010756_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759 ipv6type=$i;
10760 ipv6lib=inet6
10761 ipv6libdir=/usr/local/v6/lib
10762 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010764rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765
10766 ;;
10767 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771#include <features.h>
10772#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10773yes
10774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010775_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778 ipv6type=$i;
10779 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010781rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782
10783 ;;
10784 linux-inet6)
10785 if test -d /usr/inet6; then
10786 ipv6type=$i
10787 ipv6lib=inet6
10788 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010789 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790 fi
10791 ;;
10792 solaris)
10793 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010794 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6type=$i
10796 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 fi
10798 fi
10799 ;;
10800 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010803
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804#include <sys/param.h>
10805#ifdef _TOSHIBA_INET6
10806yes
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811 ipv6type=$i;
10812 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010813 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010815rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816
10817 ;;
10818 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822#include </usr/local/v6/include/sys/v6config.h>
10823#ifdef __V6D__
10824yes
10825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 ipv6type=$i;
10830 ipv6lib=v6;
10831 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010832 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010834rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835
10836 ;;
10837 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <sys/param.h>
10842#ifdef _ZETA_MINAMI_INET6
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010850 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010852rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853
10854 ;;
10855 esac
10856 if test "$ipv6type" != "unknown"; then
10857 break
10858 fi
10859 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10861$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862fi
10863
10864if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10865 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10866 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10867 echo "using lib$ipv6lib"
10868 else
10869 if test $ipv6trylibc = "yes"; then
10870 echo "using libc"
10871 else
10872 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10873 echo "You need to fetch lib$ipv6lib.a from appropriate"
10874 echo 'ipv6 kit and compile beforehand.'
10875 exit 1
10876 fi
10877 fi
10878fi
10879
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10881$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10883/* end confdefs.h. */
10884 /* CAN_RAW_FD_FRAMES available check */
10885#include <linux/can/raw.h>
10886int
10887main ()
10888{
10889int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10890 ;
10891 return 0;
10892}
10893_ACEOF
10894if ac_fn_c_try_compile "$LINENO"; then :
10895
10896
10897$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10898
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10900$as_echo "yes" >&6; }
10901
10902else
10903
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10905$as_echo "no" >&6; }
10906
10907fi
10908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10911$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010913/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010914
10915 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010916int
10917main ()
10918{
10919FSIORefNum fRef = 0
10920 ;
10921 return 0;
10922}
Matthias Kloseb159a552010-04-25 21:00:44 +000010923
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010925if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010926
Matthias Kloseb159a552010-04-25 21:00:44 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010929
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10931$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010932
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010933else
Matthias Kloseb159a552010-04-25 21:00:44 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010937
10938fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10940
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010941# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10943$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947 withval=$with_doc_strings;
10948fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010949
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010950
10951if test -z "$with_doc_strings"
10952then with_doc_strings="yes"
10953fi
10954if test "$with_doc_strings" != "no"
10955then
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010958
10959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10961$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010962
Antoine Pitrou042b1282010-08-13 21:15:58 +000010963# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10965$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010968if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010970if test "$withval" != no
10971then
10972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10976$as_echo "yes" >&6; }
10977else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010979fi
10980else
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10982$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983fi
10984
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010985
10986# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10988$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992 withval=$with_pymalloc;
10993fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010994
Neil Schemenauera35c6882001-02-27 04:45:05 +000010995
Neil Schemenauer16c22972002-03-22 15:34:49 +000010996if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010997then
10998 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010999fi
11000if test "$with_pymalloc" != "no"
11001then
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011004
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011005 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11008$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011009
Benjamin Peterson05159c42009-12-03 03:01:27 +000011010# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11012$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013
11014# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011016 withval=$with_valgrind;
11017else
11018 with_valgrind=no
11019fi
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11022$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 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 +020011025if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011028
11029else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011030 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011031
11032fi
11033
11034
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011035 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011036fi
11037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011038# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011039
Guido van Rossum98935bf2001-09-05 19:13:16 +000011040DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011041
Guido van Rossume97ee181999-12-20 21:27:22 +000011042# the dlopen() function means we might want to use dynload_shlib.o. some
11043# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011044for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011045do :
11046 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011047if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011049#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011050_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011051
Guido van Rossume97ee181999-12-20 21:27:22 +000011052fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011053done
Guido van Rossume97ee181999-12-20 21:27:22 +000011054
Michael W. Hudson54241132001-12-07 15:38:26 +000011055
Guido van Rossume97ee181999-12-20 21:27:22 +000011056# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11057# loading of modules.
11058
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11060$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011061if test -z "$DYNLOADFILE"
11062then
11063 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011064 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11065 if test "$ac_cv_func_dlopen" = yes
11066 then DYNLOADFILE="dynload_shlib.o"
11067 else DYNLOADFILE="dynload_aix.o"
11068 fi
11069 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011070 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011071 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11072 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011073 *)
11074 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11075 # out any dynamic loading
11076 if test "$ac_cv_func_dlopen" = yes
11077 then DYNLOADFILE="dynload_shlib.o"
11078 else DYNLOADFILE="dynload_stub.o"
11079 fi
11080 ;;
11081 esac
11082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11084$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011085if test "$DYNLOADFILE" != "dynload_stub.o"
11086then
Martin v. Löwis11437992002-04-12 09:54:03 +000011087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011089
11090fi
11091
Neil Schemenauer4e425612001-06-19 15:44:15 +000011092# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11093
Michael W. Hudson54241132001-12-07 15:38:26 +000011094
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11096$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011097if test -z "$MACHDEP_OBJS"
11098then
Jack Jansene578a632001-08-15 01:27:14 +000011099 MACHDEP_OBJS=$extra_machdep_objs
11100else
11101 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011102fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011103if test -z "$MACHDEP_OBJS"; then
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11105$as_echo "none" >&6; }
11106else
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11108$as_echo "$MACHDEP_OBJS" >&6; }
11109fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011110
Guido van Rossum627b2d71993-12-24 10:39:16 +000011111# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011112for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011113 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011114 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011115 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011116 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011117 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011118 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011119 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11120 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011121 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011122 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011123 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011124 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011125 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011126 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011127 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11128 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011129 sigaction sigaltstack siginterrupt sigpending sigrelse \
11130 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011131 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011132 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011133 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011134do :
11135 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11136ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011137if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011139#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011141
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011142fi
11143done
11144
Michael W. Hudson54241132001-12-07 15:38:26 +000011145
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011146ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11147 #include <dirent.h>
11148"
11149if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11150
11151$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11152
11153fi
11154
11155
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011156# For some functions, having a definition is not sufficient, since
11157# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11159$as_echo_n "checking for chroot... " >&6; }
11160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011161/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011162#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011163int
11164main ()
11165{
11166void *x=chroot
11167 ;
11168 return 0;
11169}
11170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011174
Matthias Kloseb159a552010-04-25 21:00:44 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011176$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011177else
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011180
11181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11184$as_echo_n "checking for link... " >&6; }
11185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011187#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011188int
11189main ()
11190{
11191void *x=link
11192 ;
11193 return 0;
11194}
11195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011199
Matthias Kloseb159a552010-04-25 21:00:44 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011205
11206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11209$as_echo_n "checking for symlink... " >&6; }
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011213int
11214main ()
11215{
11216void *x=symlink
11217 ;
11218 return 0;
11219}
11220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011224
Matthias Kloseb159a552010-04-25 21:00:44 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011226$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011227else
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011230
11231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11234$as_echo_n "checking for fchdir... " >&6; }
11235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011236/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011237#include <unistd.h>
11238int
11239main ()
11240{
11241void *x=fchdir
11242 ;
11243 return 0;
11244}
11245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011249
Matthias Kloseb159a552010-04-25 21:00:44 +000011250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011252else
Matthias Kloseb9621712010-04-24 17:59:49 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11254$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011255
11256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11259$as_echo_n "checking for fsync... " >&6; }
11260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011261/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011262#include <unistd.h>
11263int
11264main ()
11265{
11266void *x=fsync
11267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011274
Matthias Kloseb159a552010-04-25 21:00:44 +000011275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011277else
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11279$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011280
11281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11284$as_echo_n "checking for fdatasync... " >&6; }
11285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287#include <unistd.h>
11288int
11289main ()
11290{
11291void *x=fdatasync
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011299
Matthias Kloseb159a552010-04-25 21:00:44 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011302else
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11304$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011305
11306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11309$as_echo_n "checking for epoll... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011311/* end confdefs.h. */
11312#include <sys/epoll.h>
11313int
11314main ()
11315{
11316void *x=epoll_create
11317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011324
Matthias Kloseb159a552010-04-25 21:00:44 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011327else
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011330
11331fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11334$as_echo_n "checking for epoll_create1... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336/* end confdefs.h. */
11337#include <sys/epoll.h>
11338int
11339main ()
11340{
11341void *x=epoll_create1
11342 ;
11343 return 0;
11344}
11345_ACEOF
11346if ac_fn_c_try_compile "$LINENO"; then :
11347
11348$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11349
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
11352else
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
11355
11356fi
11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11359$as_echo_n "checking for kqueue... " >&6; }
11360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011361/* end confdefs.h. */
11362
11363#include <sys/types.h>
11364#include <sys/event.h>
11365
11366int
11367main ()
11368{
11369int x=kqueue()
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011380else
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011383
11384fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11387$as_echo_n "checking for prlimit... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11389/* end confdefs.h. */
11390
11391#include <sys/time.h>
11392#include <sys/resource.h>
11393
11394int
11395main ()
11396{
11397void *x=prlimit
11398 ;
11399 return 0;
11400}
11401_ACEOF
11402if ac_fn_c_try_compile "$LINENO"; then :
11403
11404$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11405
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11407$as_echo "yes" >&6; }
11408else
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411
11412fi
11413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11414
Martin v. Löwisd5843682002-11-21 20:41:28 +000011415# On some systems (eg. FreeBSD 5), we would find a definition of the
11416# functions ctermid_r, setgroups in the library, but no prototype
11417# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11418# address to avoid compiler warnings and potential miscompilations
11419# because of the missing prototypes.
11420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11422$as_echo_n "checking for ctermid_r... " >&6; }
11423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011424/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011425
Martin v. Löwisd5843682002-11-21 20:41:28 +000011426#include <stdio.h>
11427
Martin v. Löwisd5843682002-11-21 20:41:28 +000011428int
11429main ()
11430{
11431void* p = ctermid_r
11432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011439
Matthias Kloseb159a552010-04-25 21:00:44 +000011440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011442else
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11444$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011445
11446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11448
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11450$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011451if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011452 $as_echo_n "(cached) " >&6
11453else
11454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011455/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011456#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011457int
11458main ()
11459{
11460void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011461
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011462 ;
11463 return 0;
11464}
11465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011466if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011467 ac_cv_flock_decl=yes
11468else
11469 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011470
11471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011473
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011474fi
11475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11476$as_echo "$ac_cv_flock_decl" >&6; }
11477if test "x${ac_cv_flock_decl}" = xyes; then
11478 for ac_func in flock
11479do :
11480 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011482 cat >>confdefs.h <<_ACEOF
11483#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011484_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011485
Antoine Pitroua3000072010-09-07 14:52:42 +000011486else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011488$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011489if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011490 $as_echo_n "(cached) " >&6
11491else
11492 ac_check_lib_save_LIBS=$LIBS
11493LIBS="-lbsd $LIBS"
11494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11495/* end confdefs.h. */
11496
11497/* Override any GCC internal prototype to avoid an error.
11498 Use char because int might match the return type of a GCC
11499 builtin and then its argument prototype would still apply. */
11500#ifdef __cplusplus
11501extern "C"
11502#endif
11503char flock ();
11504int
11505main ()
11506{
11507return flock ();
11508 ;
11509 return 0;
11510}
11511_ACEOF
11512if ac_fn_c_try_link "$LINENO"; then :
11513 ac_cv_lib_bsd_flock=yes
11514else
11515 ac_cv_lib_bsd_flock=no
11516fi
11517rm -f core conftest.err conftest.$ac_objext \
11518 conftest$ac_exeext conftest.$ac_ext
11519LIBS=$ac_check_lib_save_LIBS
11520fi
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11522$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011523if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011524 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011525
11526
11527$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11528
11529
11530fi
11531
11532
11533fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011534done
11535
Antoine Pitroua3000072010-09-07 14:52:42 +000011536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537
Matthias Kloseb9621712010-04-24 17:59:49 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11539$as_echo_n "checking for getpagesize... " >&6; }
11540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011542
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011543#include <unistd.h>
11544
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011545int
11546main ()
11547{
11548void* p = getpagesize
11549 ;
11550 return 0;
11551}
11552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011556
Matthias Kloseb159a552010-04-25 21:00:44 +000011557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011562
11563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011565
Victor Stinner984890f2011-11-24 13:53:38 +010011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11567$as_echo_n "checking for broken unsetenv... " >&6; }
11568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11569/* end confdefs.h. */
11570
11571#include <stdlib.h>
11572
11573int
11574main ()
11575{
11576int res = unsetenv("DUMMY")
11577 ;
11578 return 0;
11579}
11580_ACEOF
11581if ac_fn_c_try_compile "$LINENO"; then :
11582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11583$as_echo "no" >&6; }
11584else
11585
11586$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11587
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11589$as_echo "yes" >&6; }
11590
11591fi
11592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11593
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011594for ac_prog in true
11595do
11596 # Extract the first word of "$ac_prog", so it can be a program name with args.
11597set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11599$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011600if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011602else
11603 if test -n "$TRUE"; then
11604 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11605else
11606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11607for as_dir in $PATH
11608do
11609 IFS=$as_save_IFS
11610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011613 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 $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 +000011615 break 2
11616 fi
11617done
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011620
11621fi
11622fi
11623TRUE=$ac_cv_prog_TRUE
11624if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11626$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11629$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011630fi
11631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011632
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011633 test -n "$TRUE" && break
11634done
11635test -n "$TRUE" || TRUE="/bin/true"
11636
11637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11639$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011642else
11643 ac_check_lib_save_LIBS=$LIBS
11644LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648/* Override any GCC internal prototype to avoid an error.
11649 Use char because int might match the return type of a GCC
11650 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651#ifdef __cplusplus
11652extern "C"
11653#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011655int
11656main ()
11657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011664 ac_cv_lib_c_inet_aton=yes
11665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011668rm -f core conftest.err conftest.$ac_objext \
11669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011670LIBS=$ac_check_lib_save_LIBS
11671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11673$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011674if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011675 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11678$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011679if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011681else
11682 ac_check_lib_save_LIBS=$LIBS
11683LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011685/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687/* Override any GCC internal prototype to avoid an error.
11688 Use char because int might match the return type of a GCC
11689 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690#ifdef __cplusplus
11691extern "C"
11692#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011694int
11695main ()
11696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011703 ac_cv_lib_resolv_inet_aton=yes
11704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011707rm -f core conftest.err conftest.$ac_objext \
11708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011709LIBS=$ac_check_lib_save_LIBS
11710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11712$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011713if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714 cat >>confdefs.h <<_ACEOF
11715#define HAVE_LIBRESOLV 1
11716_ACEOF
11717
11718 LIBS="-lresolv $LIBS"
11719
11720fi
11721
11722
11723fi
11724
11725
Christian Heimesd0764e22007-12-04 15:00:33 +000011726# On Tru64, chflags seems to be present, but calling it will
11727# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11729$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011730if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011734 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011737/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011738
Christian Heimesd0764e22007-12-04 15:00:33 +000011739#include <sys/stat.h>
11740#include <unistd.h>
11741int main(int argc, char*argv[])
11742{
11743 if(chflags(argv[0], 0) != 0)
11744 return 1;
11745 return 0;
11746}
Ned Deily3eb67d52011-06-28 00:00:28 -070011747
Christian Heimesd0764e22007-12-04 15:00:33 +000011748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011750 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011756fi
11757
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11761$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011762if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011764if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011765 ac_cv_have_chflags="yes"
11766else
11767 ac_cv_have_chflags="no"
11768fi
11769
11770fi
11771if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011774
11775fi
11776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11778$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011779if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011780 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011783 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011786/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011787
Christian Heimesd0764e22007-12-04 15:00:33 +000011788#include <sys/stat.h>
11789#include <unistd.h>
11790int main(int argc, char*argv[])
11791{
11792 if(lchflags(argv[0], 0) != 0)
11793 return 1;
11794 return 0;
11795}
Ned Deily3eb67d52011-06-28 00:00:28 -070011796
Christian Heimesd0764e22007-12-04 15:00:33 +000011797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011798if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011799 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011805fi
11806
11807
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11810$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011811if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011813if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011814 ac_cv_have_lchflags="yes"
11815else
11816 ac_cv_have_lchflags="no"
11817fi
11818
11819fi
11820if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011823
11824fi
11825
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011826case $ac_sys_system/$ac_sys_release in
11827Darwin/*)
11828 _CUR_CFLAGS="${CFLAGS}"
11829 _CUR_LDFLAGS="${LDFLAGS}"
11830 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11831 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11832 ;;
11833esac
11834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11836$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011837if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011839else
11840 ac_check_lib_save_LIBS=$LIBS
11841LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011843/* end confdefs.h. */
11844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845/* Override any GCC internal prototype to avoid an error.
11846 Use char because int might match the return type of a GCC
11847 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011848#ifdef __cplusplus
11849extern "C"
11850#endif
11851char inflateCopy ();
11852int
11853main ()
11854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011856 ;
11857 return 0;
11858}
11859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011860if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011861 ac_cv_lib_z_inflateCopy=yes
11862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011865rm -f core conftest.err conftest.$ac_objext \
11866 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011867LIBS=$ac_check_lib_save_LIBS
11868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11870$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011871if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011872
Matthias Kloseb9621712010-04-24 17:59:49 +000011873$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011874
11875fi
11876
11877
11878case $ac_sys_system/$ac_sys_release in
11879Darwin/*)
11880 CFLAGS="${_CUR_CFLAGS}"
11881 LDFLAGS="${_CUR_LDFLAGS}"
11882 ;;
11883esac
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11886$as_echo_n "checking for hstrerror... " >&6; }
11887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011888/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011889
Martin v. Löwise9416172003-05-03 10:12:45 +000011890#include <netdb.h>
11891
Martin v. Löwise9416172003-05-03 10:12:45 +000011892int
11893main ()
11894{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011895void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011896 ;
11897 return 0;
11898}
11899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011903
Matthias Kloseb159a552010-04-25 21:00:44 +000011904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011905$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11908$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011909
11910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011911rm -f core conftest.err conftest.$ac_objext \
11912 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11915$as_echo_n "checking for inet_aton... " >&6; }
11916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011917/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011918
Martin v. Löwis86d66262006-02-17 08:40:11 +000011919#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011920#include <sys/socket.h>
11921#include <netinet/in.h>
11922#include <arpa/inet.h>
11923
Martin v. Löwise9416172003-05-03 10:12:45 +000011924int
11925main ()
11926{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011927void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011935
Matthias Kloseb159a552010-04-25 21:00:44 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011937$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011938else
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011941
11942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core conftest.err conftest.$ac_objext \
11944 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11947$as_echo_n "checking for inet_pton... " >&6; }
11948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011949/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011950
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011951#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011952#include <sys/socket.h>
11953#include <netinet/in.h>
11954#include <arpa/inet.h>
11955
Martin v. Löwise9416172003-05-03 10:12:45 +000011956int
11957main ()
11958{
11959void* p = inet_pton
11960 ;
11961 return 0;
11962}
11963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011967
Matthias Kloseb159a552010-04-25 21:00:44 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011973
11974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011976
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011977# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11979$as_echo_n "checking for setgroups... " >&6; }
11980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011982
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011983#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011984#ifdef HAVE_GRP_H
11985#include <grp.h>
11986#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011987
Martin v. Löwisd5843682002-11-21 20:41:28 +000011988int
11989main ()
11990{
11991void* p = setgroups
11992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011999
Matthias Kloseb159a552010-04-25 21:00:44 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12004$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012005
12006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012008
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012009# check for openpty and forkpty
12010
12011for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012012do :
12013 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012016#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012017_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012018
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12021$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012022if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012024else
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012026LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030/* Override any GCC internal prototype to avoid an error.
12031 Use char because int might match the return type of a GCC
12032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012033#ifdef __cplusplus
12034extern "C"
12035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012036char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012037int
12038main ()
12039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012050rm -f core conftest.err conftest.$ac_objext \
12051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012052LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12055$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012056if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012058 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12061$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012062if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012064else
12065 ac_check_lib_save_LIBS=$LIBS
12066LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012068/* end confdefs.h. */
12069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070/* Override any GCC internal prototype to avoid an error.
12071 Use char because int might match the return type of a GCC
12072 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012073#ifdef __cplusplus
12074extern "C"
12075#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012076char openpty ();
12077int
12078main ()
12079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012081 ;
12082 return 0;
12083}
12084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012086 ac_cv_lib_bsd_openpty=yes
12087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090rm -f core conftest.err conftest.$ac_objext \
12091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012092LIBS=$ac_check_lib_save_LIBS
12093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12095$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012098 LIBS="$LIBS -lbsd"
12099fi
12100
12101
12102fi
12103
Fred Drake8cef4cf2000-06-28 16:40:38 +000012104
12105fi
12106done
12107
12108for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012109do :
12110 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012111if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012114_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012115
Fred Drake8cef4cf2000-06-28 16:40:38 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12118$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012119if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012121else
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012123LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127/* Override any GCC internal prototype to avoid an error.
12128 Use char because int might match the return type of a GCC
12129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012130#ifdef __cplusplus
12131extern "C"
12132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012133char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012134int
12135main ()
12136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 ;
12139 return 0;
12140}
12141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012147rm -f core conftest.err conftest.$ac_objext \
12148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012149LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12152$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012153if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12158$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012161else
12162 ac_check_lib_save_LIBS=$LIBS
12163LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165/* end confdefs.h. */
12166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167/* Override any GCC internal prototype to avoid an error.
12168 Use char because int might match the return type of a GCC
12169 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170#ifdef __cplusplus
12171extern "C"
12172#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012173char forkpty ();
12174int
12175main ()
12176{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012178 ;
12179 return 0;
12180}
12181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012182if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012183 ac_cv_lib_bsd_forkpty=yes
12184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012187rm -f core conftest.err conftest.$ac_objext \
12188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012189LIBS=$ac_check_lib_save_LIBS
12190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12192$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012195 LIBS="$LIBS -lbsd"
12196fi
12197
12198
12199fi
12200
Fred Drake8cef4cf2000-06-28 16:40:38 +000012201
12202fi
12203done
12204
Jack Jansendd19cf82001-12-06 22:36:17 +000012205
Christian Heimesb186d002008-03-18 15:15:01 +000012206# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012207for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012208do :
12209 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012210if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012211 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012213_ACEOF
12214
12215fi
12216done
12217
12218
Michael W. Hudson54241132001-12-07 15:38:26 +000012219# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012220for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012221do :
12222 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12223ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012224if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012227_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012228
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012230done
12231
Michael W. Hudson54241132001-12-07 15:38:26 +000012232
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012233ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012235 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012236
Martin v. Löwis1142de32002-03-29 16:28:31 +000012237else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012239 *" dup2.$ac_objext "* ) ;;
12240 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012242esac
12243
Martin v. Löwis1142de32002-03-29 16:28:31 +000012244fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012246ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012248 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12249
12250else
12251 case " $LIBOBJS " in
12252 *" strdup.$ac_objext "* ) ;;
12253 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12254 ;;
12255esac
12256
12257fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012258
12259
12260for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012261do :
12262 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012263if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012269#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012281
Guido van Rossum627b2d71993-12-24 10:39:16 +000012282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012284
Guido van Rossum627b2d71993-12-24 10:39:16 +000012285fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012286done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012287
Jack Jansen150753c2003-03-29 22:07:47 +000012288for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012289do :
12290 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012291if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012292 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012296/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012297#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012298int
12299main ()
12300{
12301setpgrp(0,0);
12302 ;
12303 return 0;
12304}
12305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Matthias Kloseb9621712010-04-24 17:59:49 +000012308$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012309
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012312
12313fi
12314done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012315
Thomas Wouters3a584202000-08-05 23:28:51 +000012316for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012317do :
12318 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012319if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012320 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012326int
12327main ()
12328{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_compile "$LINENO"; then :
12335
Guido van Rossum627b2d71993-12-24 10:39:16 +000012336else
Skip Montanaro6dead952003-09-25 14:50:04 +000012337
Matthias Kloseb9621712010-04-24 17:59:49 +000012338$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012339
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Guido van Rossum627b2d71993-12-24 10:39:16 +000012341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012343
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012345done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346
Michael W. Hudson54241132001-12-07 15:38:26 +000012347
Victor Stinnere0be4232011-10-25 13:06:09 +020012348for ac_func in clock_gettime
12349do :
12350 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12351if test "x$ac_cv_func_clock_gettime" = xyes; then :
12352 cat >>confdefs.h <<_ACEOF
12353#define HAVE_CLOCK_GETTIME 1
12354_ACEOF
12355
12356else
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12359$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12360if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12361 $as_echo_n "(cached) " >&6
12362else
12363 ac_check_lib_save_LIBS=$LIBS
12364LIBS="-lrt $LIBS"
12365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366/* end confdefs.h. */
12367
12368/* Override any GCC internal prototype to avoid an error.
12369 Use char because int might match the return type of a GCC
12370 builtin and then its argument prototype would still apply. */
12371#ifdef __cplusplus
12372extern "C"
12373#endif
12374char clock_gettime ();
12375int
12376main ()
12377{
12378return clock_gettime ();
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383if ac_fn_c_try_link "$LINENO"; then :
12384 ac_cv_lib_rt_clock_gettime=yes
12385else
12386 ac_cv_lib_rt_clock_gettime=no
12387fi
12388rm -f core conftest.err conftest.$ac_objext \
12389 conftest$ac_exeext conftest.$ac_ext
12390LIBS=$ac_check_lib_save_LIBS
12391fi
12392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12393$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12394if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12395
Victor Stinner7efb8332014-08-29 15:41:08 +020012396 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012397 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12398
12399
12400$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12401
12402
12403fi
12404
12405
12406fi
12407done
12408
12409
12410for ac_func in clock_getres
12411do :
12412 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12413if test "x$ac_cv_func_clock_getres" = xyes; then :
12414 cat >>confdefs.h <<_ACEOF
12415#define HAVE_CLOCK_GETRES 1
12416_ACEOF
12417
12418else
12419
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12421$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12422if ${ac_cv_lib_rt_clock_getres+:} false; then :
12423 $as_echo_n "(cached) " >&6
12424else
12425 ac_check_lib_save_LIBS=$LIBS
12426LIBS="-lrt $LIBS"
12427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12428/* end confdefs.h. */
12429
12430/* Override any GCC internal prototype to avoid an error.
12431 Use char because int might match the return type of a GCC
12432 builtin and then its argument prototype would still apply. */
12433#ifdef __cplusplus
12434extern "C"
12435#endif
12436char clock_getres ();
12437int
12438main ()
12439{
12440return clock_getres ();
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445if ac_fn_c_try_link "$LINENO"; then :
12446 ac_cv_lib_rt_clock_getres=yes
12447else
12448 ac_cv_lib_rt_clock_getres=no
12449fi
12450rm -f core conftest.err conftest.$ac_objext \
12451 conftest$ac_exeext conftest.$ac_ext
12452LIBS=$ac_check_lib_save_LIBS
12453fi
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12455$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12456if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12457
12458 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12459
12460
12461fi
12462
12463
12464fi
12465done
12466
12467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12469$as_echo_n "checking for major... " >&6; }
12470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012472
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012473#if defined(MAJOR_IN_MKDEV)
12474#include <sys/mkdev.h>
12475#elif defined(MAJOR_IN_SYSMACROS)
12476#include <sys/sysmacros.h>
12477#else
12478#include <sys/types.h>
12479#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012480
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012481int
12482main ()
12483{
12484
12485 makedev(major(0),minor(0));
12486
12487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012492
12493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12497$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012498
12499else
Skip Montanaro6dead952003-09-25 14:50:04 +000012500
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12502$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012503
12504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012505rm -f core conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012507
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012508# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012509# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12511$as_echo_n "checking for getaddrinfo... " >&6; }
12512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012513/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012514
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012515#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012516#include <sys/socket.h>
12517#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012518#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520int
12521main ()
12522{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012523getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012529 have_getaddrinfo=yes
12530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core conftest.err conftest.$ac_objext \
12534 conftest$ac_exeext conftest.$ac_ext
12535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12536$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012537if test $have_getaddrinfo = yes
12538then
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12540$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012541 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012545
12546if test "${enable_ipv6+set}" = set; then
12547 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12548else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012549 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012550fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012553/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012554
Stefan Krah19c21392012-11-22 23:47:32 +010012555#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012556#include <sys/types.h>
12557#include <netdb.h>
12558#include <string.h>
12559#include <sys/socket.h>
12560#include <netinet/in.h>
12561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012562int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563{
12564 int passive, gaierr, inet4 = 0, inet6 = 0;
12565 struct addrinfo hints, *ai, *aitop;
12566 char straddr[INET6_ADDRSTRLEN], strport[16];
12567
12568 for (passive = 0; passive <= 1; passive++) {
12569 memset(&hints, 0, sizeof(hints));
12570 hints.ai_family = AF_UNSPEC;
12571 hints.ai_flags = passive ? AI_PASSIVE : 0;
12572 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012573 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012574 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12575 (void)gai_strerror(gaierr);
12576 goto bad;
12577 }
12578 for (ai = aitop; ai; ai = ai->ai_next) {
12579 if (ai->ai_addr == NULL ||
12580 ai->ai_addrlen == 0 ||
12581 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12582 straddr, sizeof(straddr), strport, sizeof(strport),
12583 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12584 goto bad;
12585 }
12586 switch (ai->ai_family) {
12587 case AF_INET:
12588 if (strcmp(strport, "54321") != 0) {
12589 goto bad;
12590 }
12591 if (passive) {
12592 if (strcmp(straddr, "0.0.0.0") != 0) {
12593 goto bad;
12594 }
12595 } else {
12596 if (strcmp(straddr, "127.0.0.1") != 0) {
12597 goto bad;
12598 }
12599 }
12600 inet4++;
12601 break;
12602 case AF_INET6:
12603 if (strcmp(strport, "54321") != 0) {
12604 goto bad;
12605 }
12606 if (passive) {
12607 if (strcmp(straddr, "::") != 0) {
12608 goto bad;
12609 }
12610 } else {
12611 if (strcmp(straddr, "::1") != 0) {
12612 goto bad;
12613 }
12614 }
12615 inet6++;
12616 break;
12617 case AF_UNSPEC:
12618 goto bad;
12619 break;
12620 default:
12621 /* another family support? */
12622 break;
12623 }
12624 }
12625 }
12626
12627 if (!(inet4 == 0 || inet4 == 2))
12628 goto bad;
12629 if (!(inet6 == 0 || inet6 == 2))
12630 goto bad;
12631
12632 if (aitop)
12633 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012634 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012635
12636 bad:
12637 if (aitop)
12638 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012639 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640}
12641
Martin v. Löwis11437992002-04-12 09:54:03 +000012642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012643if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012644 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012645else
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012651
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012652fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012653
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12657$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12658
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012659if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012660then
12661 if test $ipv6 = yes
12662 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012663 echo 'Fatal: You must get working getaddrinfo() function.'
12664 echo ' or you can specify "--disable-ipv6"'.
12665 exit 1
12666 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012667else
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012670
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012671fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012672
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012673for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012674do :
12675 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012676if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012679_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012680
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012681fi
12682done
12683
Michael W. Hudson54241132001-12-07 15:38:26 +000012684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12687$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012688if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690else
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012692/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012693#include <sys/types.h>
12694#include <sys/time.h>
12695#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012696
Martin v. Löwis11437992002-04-12 09:54:03 +000012697int
12698main ()
12699{
12700if ((struct tm *) 0)
12701return 0;
12702 ;
12703 return 0;
12704}
12705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12714$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012715if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718
12719fi
12720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12722$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012723if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728#include <sys/types.h>
12729#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Martin v. Löwis11437992002-04-12 09:54:03 +000012731int
12732main ()
12733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734struct tm tm;
12735 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ;
12738 return 0;
12739}
12740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012741if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742 ac_cv_struct_tm=time.h
12743else
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12749$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012750if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012753
12754fi
12755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756ac_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 +000012757#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759"
Victor Stinnere0be4232011-10-25 13:06:09 +020012760if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
12762cat >>confdefs.h <<_ACEOF
12763#define HAVE_STRUCT_TM_TM_ZONE 1
12764_ACEOF
12765
12766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012768
Martin v. Löwis11437992002-04-12 09:54:03 +000012769if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772
12773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12775"
Victor Stinnere0be4232011-10-25 13:06:09 +020012776if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778else
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780fi
12781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012783#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784_ACEOF
12785
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12787$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012788if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012792/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012793#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794#if !HAVE_DECL_TZNAME
12795extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Martin v. Löwis11437992002-04-12 09:54:03 +000012798int
12799main ()
12800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ;
12803 return 0;
12804}
12805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012806if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807 ac_cv_var_tzname=yes
12808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012811rm -f core conftest.err conftest.$ac_objext \
12812 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12815$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012816 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820 fi
12821fi
12822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823ac_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 +020012824if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012825
12826cat >>confdefs.h <<_ACEOF
12827#define HAVE_STRUCT_STAT_ST_RDEV 1
12828_ACEOF
12829
12830
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012831fi
12832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833ac_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 +020012834if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012835
Martin v. Löwis11437992002-04-12 09:54:03 +000012836cat >>confdefs.h <<_ACEOF
12837#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12838_ACEOF
12839
12840
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012841fi
12842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843ac_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 +020012844if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012845
12846cat >>confdefs.h <<_ACEOF
12847#define HAVE_STRUCT_STAT_ST_FLAGS 1
12848_ACEOF
12849
12850
12851fi
12852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853ac_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 +020012854if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012855
12856cat >>confdefs.h <<_ACEOF
12857#define HAVE_STRUCT_STAT_ST_GEN 1
12858_ACEOF
12859
12860
12861fi
12862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863ac_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 +020012864if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012865
12866cat >>confdefs.h <<_ACEOF
12867#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12868_ACEOF
12869
12870
12871fi
12872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873ac_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 +020012874if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012875
Martin v. Löwis11437992002-04-12 09:54:03 +000012876cat >>confdefs.h <<_ACEOF
12877#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12878_ACEOF
12879
12880
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012881fi
12882
Stefan Krah267b6392016-04-26 01:09:18 +020012883ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12884 #include <sys/types.h>
12885 #include <pwd.h>
12886
12887"
12888if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12889
12890cat >>confdefs.h <<_ACEOF
12891#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12892_ACEOF
12893
12894
12895fi
12896ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12897 #include <sys/types.h>
12898 #include <pwd.h>
12899
12900"
12901if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12902
12903cat >>confdefs.h <<_ACEOF
12904#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12905_ACEOF
12906
12907
12908fi
12909
Michael W. Hudson54241132001-12-07 15:38:26 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12912$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012913if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012915else
Matthias Kloseb159a552010-04-25 21:00:44 +000012916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012918/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012919#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012920int
12921main ()
12922{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ;
12925 return 0;
12926}
12927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929 ac_cv_header_time_altzone=yes
12930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935fi
12936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12938$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942
12943fi
12944
Guido van Rossumda88dad1995-01-26 00:46:29 +000012945was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12947$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012949/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012950
12951#include <sys/types.h>
12952#include <sys/select.h>
12953#include <sys/time.h>
12954
Martin v. Löwis11437992002-04-12 09:54:03 +000012955int
12956main ()
12957{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012958;
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 ;
12960 return 0;
12961}
12962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
12965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012968 was_it_defined=yes
12969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12973$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12976$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012977if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012981/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012982#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012983int
12984main ()
12985{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 ;
12988 return 0;
12989}
12990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012992 ac_cv_struct_addrinfo=yes
12993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12997fi
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13000$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004
13005fi
13006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13008$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013009if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013013/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013014
13015# include <sys/types.h>
13016# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013017int
13018main ()
13019{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ;
13022 return 0;
13023}
13024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026 ac_cv_struct_sockaddr_storage=yes
13027else
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13031fi
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13034$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013038
13039fi
13040
Guido van Rossum627b2d71993-12-24 10:39:16 +000013041# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13044$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013051int
13052main ()
13053{
13054static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013055test_array [0] = 0;
13056return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
13058 ;
13059 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013060}
Martin v. Löwis11437992002-04-12 09:54:03 +000013061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013062if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013063 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013064else
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13070$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013073
13074fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13077$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013078if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083
Martin v. Löwis11437992002-04-12 09:54:03 +000013084int
13085main ()
13086{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013087
Martin v. Löwis11437992002-04-12 09:54:03 +000013088#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013089 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013091 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093 char const *const *pcpcc;
13094 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 /* NEC SVR4.0.2 mips cc rejects this. */
13096 struct point {int x, y;};
13097 static struct point const zero = {0,0};
13098 /* AIX XL C 1.02.0.0 rejects this.
13099 It does not let you subtract one const X* pointer from another in
13100 an arm of an if-expression whose if-part is not a constant
13101 expression */
13102 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105 ++pcpcc;
13106 ppc = (char**) pcpcc;
13107 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013108 { /* SCO 3.2v4 cc rejects this sort of thing. */
13109 char tx;
13110 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 }
13116 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13117 int x[] = {25, 17};
13118 const int *foo = &x[0];
13119 ++foo;
13120 }
13121 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13122 typedef const int *iptr;
13123 iptr p = 0;
13124 ++p;
13125 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013126 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013128 struct s { int j; const int *ap[3]; } bx;
13129 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 }
13131 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13132 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013136#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013137
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 ;
13139 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013140}
Martin v. Löwis11437992002-04-12 09:54:03 +000013141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013142if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143 ac_cv_c_const=yes
13144else
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13150$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013151if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154
13155fi
13156
Michael W. Hudson54241132001-12-07 15:38:26 +000013157
Guido van Rossumda88dad1995-01-26 00:46:29 +000013158works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13160$as_echo_n "checking for working volatile... " >&6; }
13161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013162/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013163
Martin v. Löwis11437992002-04-12 09:54:03 +000013164int
13165main ()
13166{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 ;
13169 return 0;
13170}
13171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013172if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013173 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013174else
Skip Montanaro6dead952003-09-25 14:50:04 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013177
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013178
Guido van Rossum627b2d71993-12-24 10:39:16 +000013179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13182$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013183
Guido van Rossumda88dad1995-01-26 00:46:29 +000013184works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13186$as_echo_n "checking for working signed char... " >&6; }
13187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013188/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013189
Martin v. Löwis11437992002-04-12 09:54:03 +000013190int
13191main ()
13192{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 ;
13195 return 0;
13196}
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013199 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013200else
Skip Montanaro6dead952003-09-25 14:50:04 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013204
Guido van Rossum7f43da71994-08-01 12:15:30 +000013205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13208$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013209
Guido van Rossumda88dad1995-01-26 00:46:29 +000013210have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13212$as_echo_n "checking for prototypes... " >&6; }
13213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013214/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013215int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013216int
13217main ()
13218{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 ;
13221 return 0;
13222}
13223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013224if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
Matthias Kloseb159a552010-04-25 21:00:44 +000013228 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13232$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233
Guido van Rossumda88dad1995-01-26 00:46:29 +000013234works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13236$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013238/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013239
13240#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013241int foo(int x, ...) {
13242 va_list va;
13243 va_start(va, x);
13244 va_arg(va, int);
13245 va_arg(va, char *);
13246 va_arg(va, double);
13247 return 0;
13248}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250int
13251main ()
13252{
Guido van Rossum90eea071996-08-30 20:58:57 +000013253return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 ;
13255 return 0;
13256}
13257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013258if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013259
13260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013262
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013263 works=yes
13264
Guido van Rossum627b2d71993-12-24 10:39:16 +000013265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13268$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013269
Martin v. Löwisd6320502004-08-12 13:45:08 +000013270# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13272$as_echo_n "checking for socketpair... " >&6; }
13273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013274/* end confdefs.h. */
13275
13276#include <sys/types.h>
13277#include <sys/socket.h>
13278
13279int
13280main ()
13281{
13282void *x=socketpair
13283 ;
13284 return 0;
13285}
13286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013290
Matthias Kloseb159a552010-04-25 21:00:44 +000013291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013292$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13295$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013296
13297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013299
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13302$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013304/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013305#include <sys/types.h>
13306#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013307int
13308main ()
13309{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310struct sockaddr x;
13311x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 ;
13313 return 0;
13314}
13315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if ac_fn_c_try_compile "$LINENO"; then :
13317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13318$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013321
13322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13324$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013325
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013328
Guido van Rossumda88dad1995-01-26 00:46:29 +000013329va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13331$as_echo_n "checking whether va_list is an array... " >&6; }
13332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334
13335#ifdef HAVE_STDARG_PROTOTYPES
13336#include <stdarg.h>
13337#else
13338#include <varargs.h>
13339#endif
13340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341int
13342main ()
13343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 ;
13346 return 0;
13347}
13348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013349if ac_fn_c_try_compile "$LINENO"; then :
13350
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351else
Skip Montanaro6dead952003-09-25 14:50:04 +000013352
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Guido van Rossumda88dad1995-01-26 00:46:29 +000013356 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013357
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13361$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013363# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013367if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13372$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013373 OLD_CFLAGS=$CFLAGS
13374 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013376/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013377
13378# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Martin v. Löwis11437992002-04-12 09:54:03 +000013380int
13381main ()
13382{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013383
13384 char *name;
13385 struct hostent *he, *res;
13386 char buffer[2048];
13387 int buflen = 2048;
13388 int h_errnop;
13389
13390 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
13392 ;
13393 return 0;
13394}
13395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13404$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013406else
Skip Montanaro6dead952003-09-25 14:50:04 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13409$as_echo "no" >&6; }
13410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13411$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013413/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013414
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013415# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417int
13418main ()
13419{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013420
13421 char *name;
13422 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013423 char buffer[2048];
13424 int buflen = 2048;
13425 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426
Matthias Kloseb159a552010-04-25 21:00:44 +000013427 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
13429 ;
13430 return 0;
13431}
13432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Matthias Kloseb159a552010-04-25 21:00:44 +000013438$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13441$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013443else
Skip Montanaro6dead952003-09-25 14:50:04 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13446$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13448$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13450/* end confdefs.h. */
13451
13452# include <netdb.h>
13453
13454int
13455main ()
13456{
13457
13458 char *name;
13459 struct hostent *he;
13460 struct hostent_data data;
13461
13462 (void) gethostbyname_r(name, he, &data);
13463
13464 ;
13465 return 0;
13466}
13467_ACEOF
13468if ac_fn_c_try_compile "$LINENO"; then :
13469
13470 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13471
13472
13473$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13474
13475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13476$as_echo "yes" >&6; }
13477
13478else
13479
13480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13481$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013491 CFLAGS=$OLD_CFLAGS
13492
13493else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 for ac_func in gethostbyname
13496do :
13497 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013498if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013500#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013501_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013503fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013504done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505
Michael W. Hudson54241132001-12-07 15:38:26 +000013506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013507fi
13508
Michael W. Hudson54241132001-12-07 15:38:26 +000013509
13510
13511
13512
13513
13514
Guido van Rossum627b2d71993-12-24 10:39:16 +000013515# checks for system services
13516# (none yet)
13517
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013519ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013520if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013521
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13524$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013525if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527else
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013529LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533/* Override any GCC internal prototype to avoid an error.
13534 Use char because int might match the return type of a GCC
13535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013536#ifdef __cplusplus
13537extern "C"
13538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013539char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013540int
13541main ()
13542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 ;
13545 return 0;
13546}
13547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013550else
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013553rm -f core conftest.err conftest.$ac_objext \
13554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013555LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13558$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013559if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 cat >>confdefs.h <<_ACEOF
13561#define HAVE_LIBIEEE 1
13562_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013564 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565
Guido van Rossum627b2d71993-12-24 10:39:16 +000013566fi
13567
Michael W. Hudson54241132001-12-07 15:38:26 +000013568
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013569fi
13570
Michael W. Hudson54241132001-12-07 15:38:26 +000013571
Guido van Rossum7f253911997-05-09 02:42:48 +000013572# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13574$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013579if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013580then
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13585$as_echo "yes" >&6; }
13586else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13587$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013588fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013589else
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592fi
13593
Guido van Rossum7f253911997-05-09 02:42:48 +000013594
Guido van Rossum7f43da71994-08-01 12:15:30 +000013595# check for --with-libm=...
13596
Guido van Rossum563e7081996-09-10 18:20:48 +000013597case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013598Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013599*) LIBM=-lm
13600esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13602$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013605if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013607if test "$withval" = no
13608then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13610$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013611elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013612then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13614$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013615else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013616fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13619$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620fi
13621
Guido van Rossum7f43da71994-08-01 12:15:30 +000013622
13623# check for --with-libc=...
13624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13626$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013631if test "$withval" = no
13632then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13634$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013635elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013636then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13638$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013639else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013640fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13643$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644fi
13645
Guido van Rossum7f43da71994-08-01 12:15:30 +000013646
Stefan Krah1919b7e2012-03-21 18:25:23 +010013647# **************************************
13648# * Check for gcc x64 inline assembler *
13649# **************************************
13650
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13652$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13654/* end confdefs.h. */
13655
13656int
13657main ()
13658{
13659
13660 __asm__ __volatile__ ("movq %rcx, %rax");
13661
13662 ;
13663 return 0;
13664}
13665_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013666if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013667 have_gcc_asm_for_x64=yes
13668else
13669 have_gcc_asm_for_x64=no
13670fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013671rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13674$as_echo "$have_gcc_asm_for_x64" >&6; }
13675if test "$have_gcc_asm_for_x64" = yes
13676then
13677
13678$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13679
13680fi
13681
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013682# **************************************************
13683# * Check for various properties of floating point *
13684# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13687$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013688if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013690else
13691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013693 ac_cv_little_endian_double=no
13694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013696/* end confdefs.h. */
13697
13698#include <string.h>
13699int main() {
13700 double x = 9006104071832581.0;
13701 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13702 return 0;
13703 else
13704 return 1;
13705}
13706
13707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013708if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013709 ac_cv_little_endian_double=yes
13710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013715fi
13716
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013717fi
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13720$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721if test "$ac_cv_little_endian_double" = yes
13722then
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013725
13726fi
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13729$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013730if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013732else
13733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013735 ac_cv_big_endian_double=no
13736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013738/* end confdefs.h. */
13739
13740#include <string.h>
13741int main() {
13742 double x = 9006104071832581.0;
13743 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13744 return 0;
13745 else
13746 return 1;
13747}
13748
13749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013750if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013751 ac_cv_big_endian_double=yes
13752else
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013757fi
13758
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759fi
13760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13762$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763if test "$ac_cv_big_endian_double" = yes
13764then
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767
13768fi
13769
13770# Some ARM platforms use a mixed-endian representation for doubles.
13771# While Python doesn't currently have full support for these platforms
13772# (see e.g., issue 1762561), we can at least make sure that float <-> string
13773# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13775$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013778else
13779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781 ac_cv_mixed_endian_double=no
13782else
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013784/* end confdefs.h. */
13785
13786#include <string.h>
13787int main() {
13788 double x = 9006104071832581.0;
13789 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13790 return 0;
13791 else
13792 return 1;
13793}
13794
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013797 ac_cv_mixed_endian_double=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803fi
13804
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013805fi
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13808$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809if test "$ac_cv_mixed_endian_double" = yes
13810then
13811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013813
13814fi
13815
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013816# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013817# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013818# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013819# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013820# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013821# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013822
13823# This inline assembler syntax may also work for suncc and icc,
13824# so we try it on all platforms.
13825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13827$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829/* end confdefs.h. */
13830
13831int
13832main ()
13833{
13834
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013835 unsigned short cw;
13836 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13837 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013838
13839 ;
13840 return 0;
13841}
13842_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013843if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844 have_gcc_asm_for_x87=yes
13845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013848rm -f core conftest.err conftest.$ac_objext \
13849 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13851$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013852if test "$have_gcc_asm_for_x87" = yes
13853then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854
Matthias Kloseb9621712010-04-24 17:59:49 +000013855$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013858
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13860$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13862/* end confdefs.h. */
13863
13864int
13865main ()
13866{
13867
13868 unsigned int fpcr;
13869 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13870 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13871
13872 ;
13873 return 0;
13874}
13875_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013876if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013877 have_gcc_asm_for_mc68881=yes
13878else
13879 have_gcc_asm_for_mc68881=no
13880fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013881rm -f core conftest.err conftest.$ac_objext \
13882 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13884$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13885if test "$have_gcc_asm_for_mc68881" = yes
13886then
13887
13888$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13889
13890fi
13891
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013892# Detect whether system arithmetic is subject to x87-style double
13893# rounding issues. The result of this test has little meaning on non
13894# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13895# mode is round-to-nearest and double rounding issues are present, and
13896# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13898$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899# $BASECFLAGS may affect the result
13900ac_save_cc="$CC"
13901CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013902if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013903 ac_cv_x87_double_rounding=no
13904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013906/* end confdefs.h. */
13907
13908#include <stdlib.h>
13909#include <math.h>
13910int main() {
13911 volatile double x, y, z;
13912 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13913 x = 0.99999999999999989; /* 1-2**-53 */
13914 y = 1./x;
13915 if (y != 1.)
13916 exit(0);
13917 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13918 x = 1e16;
13919 y = 2.99999;
13920 z = x + y;
13921 if (z != 1e16+4.)
13922 exit(0);
13923 /* both tests show evidence of double rounding */
13924 exit(1);
13925}
13926
13927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013928if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013929 ac_cv_x87_double_rounding=no
13930else
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013935fi
13936
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013937CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13939$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013940if test "$ac_cv_x87_double_rounding" = yes
13941then
13942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013944
13945fi
13946
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947# ************************************
13948# * Check for mathematical functions *
13949# ************************************
13950
13951LIBS_SAVE=$LIBS
13952LIBS="$LIBS $LIBM"
13953
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013954for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13955do :
13956 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13957ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013958if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013959 cat >>confdefs.h <<_ACEOF
13960#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13961_ACEOF
13962
13963fi
13964done
13965
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013966for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013967do :
13968 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13969ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013970if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013971 cat >>confdefs.h <<_ACEOF
13972#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13973_ACEOF
13974
13975fi
13976done
13977
13978ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13979"
Victor Stinnere0be4232011-10-25 13:06:09 +020013980if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013981 ac_have_decl=1
13982else
13983 ac_have_decl=0
13984fi
13985
13986cat >>confdefs.h <<_ACEOF
13987#define HAVE_DECL_ISINF $ac_have_decl
13988_ACEOF
13989ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13990"
Victor Stinnere0be4232011-10-25 13:06:09 +020013991if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013992 ac_have_decl=1
13993else
13994 ac_have_decl=0
13995fi
13996
13997cat >>confdefs.h <<_ACEOF
13998#define HAVE_DECL_ISNAN $ac_have_decl
13999_ACEOF
14000ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14001"
Victor Stinnere0be4232011-10-25 13:06:09 +020014002if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014003 ac_have_decl=1
14004else
14005 ac_have_decl=0
14006fi
14007
14008cat >>confdefs.h <<_ACEOF
14009#define HAVE_DECL_ISFINITE $ac_have_decl
14010_ACEOF
14011
14012
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014013# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14014# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14016$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014017if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014019else
14020
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014022 ac_cv_tanh_preserves_zero_sign=no
14023else
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014025/* end confdefs.h. */
14026
14027#include <math.h>
14028#include <stdlib.h>
14029int main() {
14030 /* return 0 if either negative zeros don't exist
14031 on this platform or if negative zeros exist
14032 and tanh(-0.) == -0. */
14033 if (atan2(0., -1.) == atan2(-0., -1.) ||
14034 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14035 else exit(1);
14036}
14037
14038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014039if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014040 ac_cv_tanh_preserves_zero_sign=yes
14041else
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014046fi
14047
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014048fi
14049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14051$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014052if test "$ac_cv_tanh_preserves_zero_sign" = yes
14053then
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014056
14057fi
14058
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014059if test "$ac_cv_func_log1p" = yes
14060then
14061 # On some versions of AIX, log1p(-0.) returns 0. instead of
14062 # -0. See issue #9920.
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14064$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014065 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014066 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014067else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014068
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014069 if test "$cross_compiling" = yes; then :
14070 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014071else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14073/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014074
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014075 #include <math.h>
14076 #include <stdlib.h>
14077 int main() {
14078 /* Fail if the signs of log1p(-0.) and -0. can be
14079 distinguished. */
14080 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14081 return 0;
14082 else
14083 return 1;
14084 }
14085
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014086_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014087if ac_fn_c_try_run "$LINENO"; then :
14088 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014089else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014090 ac_cv_log1p_drops_zero_sign=yes
14091fi
14092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014094fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014095
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014096fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014097
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14099$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14100fi
14101if test "$ac_cv_log1p_drops_zero_sign" = yes
14102then
14103
14104$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14105
14106fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014107
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014108LIBS=$LIBS_SAVE
14109
Mark Dickinsona614f042009-11-28 12:48:43 +000014110# For multiprocessing module, check that sem_open
14111# actually works. For FreeBSD versions <= 7.2,
14112# the kernel module that provides POSIX semaphores
14113# isn't loaded by default, so an attempt to call
14114# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14116$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014117if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014119else
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014121 ac_cv_posix_semaphores_enabled=yes
14122else
Matthias Kloseb9621712010-04-24 17:59:49 +000014123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014124/* end confdefs.h. */
14125
14126#include <unistd.h>
14127#include <fcntl.h>
14128#include <stdio.h>
14129#include <semaphore.h>
14130#include <sys/stat.h>
14131
14132int main(void) {
14133 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14134 if (a == SEM_FAILED) {
14135 perror("sem_open");
14136 return 1;
14137 }
14138 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014139 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014140 return 0;
14141}
14142
14143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014144if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014145 ac_cv_posix_semaphores_enabled=yes
14146else
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014151fi
14152
14153
Mark Dickinsona614f042009-11-28 12:48:43 +000014154fi
14155
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14157$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014158if test $ac_cv_posix_semaphores_enabled = no
14159then
14160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014162
14163fi
14164
Mark Dickinson10683072009-04-18 21:18:19 +000014165# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14167$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014168if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014170else
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014173else
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014175/* end confdefs.h. */
14176
14177#include <unistd.h>
14178#include <fcntl.h>
14179#include <stdio.h>
14180#include <semaphore.h>
14181#include <sys/stat.h>
14182
14183int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014184 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014185 int count;
14186 int res;
14187 if(a==SEM_FAILED){
14188 perror("sem_open");
14189 return 1;
14190
14191 }
14192 res = sem_getvalue(a, &count);
14193 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014194 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014195 return res==-1 ? 1 : 0;
14196}
14197
Mark Dickinson10683072009-04-18 21:18:19 +000014198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014199if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014200 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014201else
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014206fi
14207
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014209fi
14210
Matthias Kloseb9621712010-04-24 17:59:49 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14212$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014213if test $ac_cv_broken_sem_getvalue = yes
14214then
14215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014217
14218fi
14219
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014220ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14221"
14222if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14223 ac_have_decl=1
14224else
14225 ac_have_decl=0
14226fi
14227
14228cat >>confdefs.h <<_ACEOF
14229#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14230_ACEOF
14231ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14232"
14233if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14234 ac_have_decl=1
14235else
14236 ac_have_decl=0
14237fi
14238
14239cat >>confdefs.h <<_ACEOF
14240#define HAVE_DECL_RTLD_NOW $ac_have_decl
14241_ACEOF
14242ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14243"
14244if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14245 ac_have_decl=1
14246else
14247 ac_have_decl=0
14248fi
14249
14250cat >>confdefs.h <<_ACEOF
14251#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14252_ACEOF
14253ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14254"
14255if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14256 ac_have_decl=1
14257else
14258 ac_have_decl=0
14259fi
14260
14261cat >>confdefs.h <<_ACEOF
14262#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14263_ACEOF
14264ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14265"
14266if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14267 ac_have_decl=1
14268else
14269 ac_have_decl=0
14270fi
14271
14272cat >>confdefs.h <<_ACEOF
14273#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14274_ACEOF
14275ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14276"
14277if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14278 ac_have_decl=1
14279else
14280 ac_have_decl=0
14281fi
14282
14283cat >>confdefs.h <<_ACEOF
14284#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14285_ACEOF
14286ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14287"
14288if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14289 ac_have_decl=1
14290else
14291 ac_have_decl=0
14292fi
14293
14294cat >>confdefs.h <<_ACEOF
14295#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14296_ACEOF
14297
14298
Mark Dickinsonbd792642009-03-18 20:06:12 +000014299# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14301$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014302# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014304 enableval=$enable_big_digits; case $enable_big_digits in
14305yes)
14306 enable_big_digits=30 ;;
14307no)
14308 enable_big_digits=15 ;;
1430915|30)
14310 ;;
14311*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014312 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 +000014313esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14315$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014316
14317cat >>confdefs.h <<_ACEOF
14318#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14319_ACEOF
14320
14321
14322else
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14324$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014325fi
14326
14327
Guido van Rossumef2255b2000-03-10 22:30:29 +000014328# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014329ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014330if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
14332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014335 wchar_h="yes"
14336
Guido van Rossumef2255b2000-03-10 22:30:29 +000014337else
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014339
14340fi
14341
Michael W. Hudson54241132001-12-07 15:38:26 +000014342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014344# determine wchar_t size
14345if test "$wchar_h" = yes
14346then
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14350# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14352$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014353if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14357"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Martin v. Löwis11437992002-04-12 09:54:03 +000014359else
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 if test "$ac_cv_type_wchar_t" = yes; then
14361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014363as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014364See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365 else
14366 ac_cv_sizeof_wchar_t=0
14367 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014369
Martin v. Löwis11437992002-04-12 09:54:03 +000014370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14372$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373
14374
14375
Martin v. Löwis11437992002-04-12 09:54:03 +000014376cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014377#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014378_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014379
Michael W. Hudson54241132001-12-07 15:38:26 +000014380
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014381fi
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14384$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014385have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014387/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014388
14389#include <tcl.h>
14390#if TCL_UTF_MAX != 6
14391# error "NOT UCS4_TCL"
14392#endif
14393int
14394main ()
14395{
14396
14397 ;
14398 return 0;
14399}
14400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014402
14403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014405
14406 have_ucs4_tcl=yes
14407
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14411$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014412
Skip Montanaro6dead952003-09-25 14:50:04 +000014413# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014414if test "$wchar_h" = yes
14415then
14416 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14418$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014419 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014421else
14422
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014424 ac_cv_wchar_t_signed=yes
14425else
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014427/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014428
14429 #include <wchar.h>
14430 int main()
14431 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014432 /* Success: exit code 0 */
14433 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014434 }
14435
14436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014438 ac_cv_wchar_t_signed=yes
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014444fi
14445
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014446fi
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14449$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450fi
14451
Georg Brandl52d168a2008-01-07 18:10:24 +000014452# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014453if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014454 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014455then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014456 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014459
Georg Brandl52d168a2008-01-07 18:10:24 +000014460else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014461 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014462fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14464$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014465
14466# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14468$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014469if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014471else
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 ac_cv_c_bigendian=unknown
14473 # See if we're dealing with a universal compiler.
14474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14475/* end confdefs.h. */
14476#ifndef __APPLE_CC__
14477 not a universal capable compiler
14478 #endif
14479 typedef int dummy;
14480
Skip Montanaro6dead952003-09-25 14:50:04 +000014481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014482if ac_fn_c_try_compile "$LINENO"; then :
14483
14484 # Check for potential -arch flags. It is not universal unless
14485 # there are at least two -arch flags with different values.
14486 ac_arch=
14487 ac_prev=
14488 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14489 if test -n "$ac_prev"; then
14490 case $ac_word in
14491 i?86 | x86_64 | ppc | ppc64)
14492 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14493 ac_arch=$ac_word
14494 else
14495 ac_cv_c_bigendian=universal
14496 break
14497 fi
14498 ;;
14499 esac
14500 ac_prev=
14501 elif test "x$ac_word" = "x-arch"; then
14502 ac_prev=arch
14503 fi
14504 done
14505fi
14506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14507 if test $ac_cv_c_bigendian = unknown; then
14508 # See if sys/param.h defines the BYTE_ORDER macro.
14509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014510/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014511#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513
Martin v. Löwis11437992002-04-12 09:54:03 +000014514int
14515main ()
14516{
Matthias Kloseb9621712010-04-24 17:59:49 +000014517#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14518 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14519 && LITTLE_ENDIAN)
14520 bogus endian macros
14521 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
14523 ;
14524 return 0;
14525}
14526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014527if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014528 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014530/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014531#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014533
Martin v. Löwis11437992002-04-12 09:54:03 +000014534int
14535main ()
14536{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014537#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 not big endian
14539 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541 ;
14542 return 0;
14543}
14544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014546 ac_cv_c_bigendian=yes
14547else
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014551fi
14552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14553 fi
14554 if test $ac_cv_c_bigendian = unknown; then
14555 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014557/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014558#include <limits.h>
14559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560int
14561main ()
14562{
Matthias Kloseb9621712010-04-24 17:59:49 +000014563#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14564 bogus endian macros
14565 #endif
14566
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 ;
14568 return 0;
14569}
14570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if ac_fn_c_try_compile "$LINENO"; then :
14572 # It does; now see whether it defined to _BIG_ENDIAN or not.
14573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14574/* end confdefs.h. */
14575#include <limits.h>
14576
14577int
14578main ()
14579{
14580#ifndef _BIG_ENDIAN
14581 not big endian
14582 #endif
14583
14584 ;
14585 return 0;
14586}
14587_ACEOF
14588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014590else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14594fi
14595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14596 fi
14597 if test $ac_cv_c_bigendian = unknown; then
14598 # Compile a test program.
14599 if test "$cross_compiling" = yes; then :
14600 # Try to guess by grepping values from an object file.
14601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14602/* end confdefs.h. */
14603short int ascii_mm[] =
14604 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14605 short int ascii_ii[] =
14606 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14607 int use_ascii (int i) {
14608 return ascii_mm[i] + ascii_ii[i];
14609 }
14610 short int ebcdic_ii[] =
14611 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14612 short int ebcdic_mm[] =
14613 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14614 int use_ebcdic (int i) {
14615 return ebcdic_mm[i] + ebcdic_ii[i];
14616 }
14617 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619int
14620main ()
14621{
14622return use_ascii (foo) == use_ebcdic (foo);
14623 ;
14624 return 0;
14625}
14626_ACEOF
14627if ac_fn_c_try_compile "$LINENO"; then :
14628 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14629 ac_cv_c_bigendian=yes
14630 fi
14631 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14632 if test "$ac_cv_c_bigendian" = unknown; then
14633 ac_cv_c_bigendian=no
14634 else
14635 # finding both strings is unlikely to happen, but who knows?
14636 ac_cv_c_bigendian=unknown
14637 fi
14638 fi
14639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014643/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014645int
14646main ()
14647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 /* Are we little or big endian? From Harbison&Steele. */
14650 union
14651 {
14652 long int l;
14653 char c[sizeof (long int)];
14654 } u;
14655 u.l = 1;
14656 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657
14658 ;
14659 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014660}
Martin v. Löwis11437992002-04-12 09:54:03 +000014661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014662if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014663 ac_cv_c_bigendian=no
14664else
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14668 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14674$as_echo "$ac_cv_c_bigendian" >&6; }
14675 case $ac_cv_c_bigendian in #(
14676 yes)
14677 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14678;; #(
14679 no)
14680 ;; #(
14681 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 ;; #(
14686 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014687 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014688 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014690
Michael W. Hudson54241132001-12-07 15:38:26 +000014691
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014692# ABI version string for Python extension modules. This appears between the
14693# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14694# from the following attributes which affect the ABI of this Python build (in
14695# this order):
14696#
14697# * The Python implementation (always 'cpython-' for us)
14698# * The major and minor version numbers
14699# * --with-pydebug (adds a 'd')
14700# * --with-pymalloc (adds a 'm')
14701# * --with-wide-unicode (adds a 'u')
14702#
14703# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014704# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14705# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014706
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14708$as_echo_n "checking ABIFLAGS... " >&6; }
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14710$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14712$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014713SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14715$as_echo "$SOABI" >&6; }
14716
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014717
14718case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014719 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014720 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14721 *)
14722 EXT_SUFFIX=${SHLIB_SUFFIX};;
14723esac
14724
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14726$as_echo_n "checking LDVERSION... " >&6; }
14727LDVERSION='$(VERSION)$(ABIFLAGS)'
14728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14729$as_echo "$LDVERSION" >&6; }
14730
doko@python.org87421192013-01-26 11:39:31 +010014731
doko@ubuntu.com55532312016-06-14 08:55:19 +020014732if test x$PLATFORM_TRIPLET = x; then
14733 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14734else
14735 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14736fi
doko@python.org87421192013-01-26 11:39:31 +010014737
14738
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014739# Check whether right shifting a negative integer extends the sign bit
14740# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14742$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014743if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014745else
Martin v. Löwis11437992002-04-12 09:54:03 +000014746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014748 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014752
14753int main()
14754{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014755 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014756}
14757
Martin v. Löwis11437992002-04-12 09:54:03 +000014758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014759if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014760 ac_cv_rshift_extends_sign=yes
14761else
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14765 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014766fi
14767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014768fi
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14771$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014772if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014773then
Martin v. Löwis11437992002-04-12 09:54:03 +000014774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014776
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014777fi
14778
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014779# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14781$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014784else
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014787/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014788#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014789int
14790main ()
14791{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014792
14793 FILE *f = fopen("/dev/null", "r");
14794 flockfile(f);
14795 getc_unlocked(f);
14796 funlockfile(f);
14797
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 ;
14799 return 0;
14800}
14801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014802if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014803 ac_cv_have_getc_unlocked=yes
14804else
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 ac_cv_have_getc_unlocked=no
14806fi
14807rm -f core conftest.err conftest.$ac_objext \
14808 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14812$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014813if test "$ac_cv_have_getc_unlocked" = yes
14814then
Martin v. Löwis11437992002-04-12 09:54:03 +000014815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014817
14818fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014819
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014820# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014821# save the value of LIBS so we don't actually link Python with readline
14822LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014823
Gregory P. Smith18820942008-09-07 06:24:49 +000014824# On some systems we need to link readline to a termcap compatible
14825# library. NOTE: Keep the precedence of listed libraries synchronised
14826# with setup.py.
14827py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14829$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014830for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014831 if test -z "$py_libtermcap"; then
14832 READLINE_LIBS="-lreadline"
14833 else
14834 READLINE_LIBS="-lreadline -l$py_libtermcap"
14835 fi
14836 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014838/* end confdefs.h. */
14839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840/* Override any GCC internal prototype to avoid an error.
14841 Use char because int might match the return type of a GCC
14842 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014843#ifdef __cplusplus
14844extern "C"
14845#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014846char readline ();
14847int
14848main ()
14849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014851 ;
14852 return 0;
14853}
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014856 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014858rm -f core conftest.err conftest.$ac_objext \
14859 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014860 if test $py_cv_lib_readline = yes; then
14861 break
14862 fi
14863done
14864# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14865#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014866if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14868$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14871$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014872
Matthias Kloseb9621712010-04-24 17:59:49 +000014873$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014874
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014875fi
14876
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014877# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14879$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014880if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014882else
14883 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014884LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014886/* end confdefs.h. */
14887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888/* Override any GCC internal prototype to avoid an error.
14889 Use char because int might match the return type of a GCC
14890 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014891#ifdef __cplusplus
14892extern "C"
14893#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014894char rl_callback_handler_install ();
14895int
14896main ()
14897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014899 ;
14900 return 0;
14901}
14902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014903if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014904 ac_cv_lib_readline_rl_callback_handler_install=yes
14905else
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014908rm -f core conftest.err conftest.$ac_objext \
14909 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014910LIBS=$ac_check_lib_save_LIBS
14911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14913$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014914if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014917
14918fi
14919
14920
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014921# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014923/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014924#include <readline/readline.h>
14925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014926if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014927 have_readline=yes
14928else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014929 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014930
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014931fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014932rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014933if test $have_readline = yes
14934then
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014936/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014937#include <readline/readline.h>
14938
14939_ACEOF
14940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014944
14945fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014946rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014949/* end confdefs.h. */
14950#include <readline/readline.h>
14951
14952_ACEOF
14953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014955
Matthias Kloseb9621712010-04-24 17:59:49 +000014956$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014957
14958fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014959rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014960
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014961fi
14962
Martin v. Löwis0daad592001-09-30 21:09:59 +000014963# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14965$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014966if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014968else
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014970LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974/* Override any GCC internal prototype to avoid an error.
14975 Use char because int might match the return type of a GCC
14976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014977#ifdef __cplusplus
14978extern "C"
14979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014980char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014981int
14982main ()
14983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ;
14986 return 0;
14987}
14988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014991else
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014994rm -f core conftest.err conftest.$ac_objext \
14995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014996LIBS=$ac_check_lib_save_LIBS
14997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14999$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015000if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015001
Matthias Kloseb9621712010-04-24 17:59:49 +000015002$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015003
Martin v. Löwis0daad592001-09-30 21:09:59 +000015004fi
15005
Michael W. Hudson54241132001-12-07 15:38:26 +000015006
Thomas Wouters89d996e2007-09-08 17:39:28 +000015007# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15009$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015010if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015012else
15013 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015014LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015016/* end confdefs.h. */
15017
15018/* Override any GCC internal prototype to avoid an error.
15019 Use char because int might match the return type of a GCC
15020 builtin and then its argument prototype would still apply. */
15021#ifdef __cplusplus
15022extern "C"
15023#endif
15024char rl_completion_display_matches_hook ();
15025int
15026main ()
15027{
15028return rl_completion_display_matches_hook ();
15029 ;
15030 return 0;
15031}
15032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015033if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015034 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15035else
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015038rm -f core conftest.err conftest.$ac_objext \
15039 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015040LIBS=$ac_check_lib_save_LIBS
15041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15043$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015044if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015047
15048fi
15049
15050
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015051# also in 4.0, but not in editline
15052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15053$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15054if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15055 $as_echo_n "(cached) " >&6
15056else
15057 ac_check_lib_save_LIBS=$LIBS
15058LIBS="-lreadline $READLINE_LIBS $LIBS"
15059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15060/* end confdefs.h. */
15061
15062/* Override any GCC internal prototype to avoid an error.
15063 Use char because int might match the return type of a GCC
15064 builtin and then its argument prototype would still apply. */
15065#ifdef __cplusplus
15066extern "C"
15067#endif
15068char rl_resize_terminal ();
15069int
15070main ()
15071{
15072return rl_resize_terminal ();
15073 ;
15074 return 0;
15075}
15076_ACEOF
15077if ac_fn_c_try_link "$LINENO"; then :
15078 ac_cv_lib_readline_rl_resize_terminal=yes
15079else
15080 ac_cv_lib_readline_rl_resize_terminal=no
15081fi
15082rm -f core conftest.err conftest.$ac_objext \
15083 conftest$ac_exeext conftest.$ac_ext
15084LIBS=$ac_check_lib_save_LIBS
15085fi
15086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15087$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15088if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15089
15090$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15091
15092fi
15093
15094
Martin v. Löwis0daad592001-09-30 21:09:59 +000015095# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15097$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015098if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015100else
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015102LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106/* Override any GCC internal prototype to avoid an error.
15107 Use char because int might match the return type of a GCC
15108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015109#ifdef __cplusplus
15110extern "C"
15111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015112char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015113int
15114main ()
15115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 ;
15118 return 0;
15119}
15120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015123else
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015126rm -f core conftest.err conftest.$ac_objext \
15127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015128LIBS=$ac_check_lib_save_LIBS
15129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15131$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015132if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015135
Guido van Rossum353ae582001-07-10 16:45:32 +000015136fi
15137
Jack Jansendd19cf82001-12-06 22:36:17 +000015138
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015139# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015141/* end confdefs.h. */
15142#include <readline/readline.h>
15143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015144if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015145 have_readline=yes
15146else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015147 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015148
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015149fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015150rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015151if test $have_readline = yes
15152then
Matthias Kloseb9621712010-04-24 17:59:49 +000015153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015154/* end confdefs.h. */
15155#include <readline/readline.h>
15156
15157_ACEOF
15158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015160
Matthias Kloseb9621712010-04-24 17:59:49 +000015161$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015162
15163fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015164rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015165
15166fi
15167
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15169$as_echo_n "checking for append_history in -lreadline... " >&6; }
15170if ${ac_cv_lib_readline_append_history+:} false; then :
15171 $as_echo_n "(cached) " >&6
15172else
15173 ac_check_lib_save_LIBS=$LIBS
15174LIBS="-lreadline $READLINE_LIBS $LIBS"
15175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176/* end confdefs.h. */
15177
15178/* Override any GCC internal prototype to avoid an error.
15179 Use char because int might match the return type of a GCC
15180 builtin and then its argument prototype would still apply. */
15181#ifdef __cplusplus
15182extern "C"
15183#endif
15184char append_history ();
15185int
15186main ()
15187{
15188return append_history ();
15189 ;
15190 return 0;
15191}
15192_ACEOF
15193if ac_fn_c_try_link "$LINENO"; then :
15194 ac_cv_lib_readline_append_history=yes
15195else
15196 ac_cv_lib_readline_append_history=no
15197fi
15198rm -f core conftest.err conftest.$ac_objext \
15199 conftest$ac_exeext conftest.$ac_ext
15200LIBS=$ac_check_lib_save_LIBS
15201fi
15202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15203$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15204if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15205
15206$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15207
15208fi
15209
15210
Martin v. Löwis82bca632006-02-10 20:49:30 +000015211# End of readline checks: restore LIBS
15212LIBS=$LIBS_no_readline
15213
Matthias Kloseb9621712010-04-24 17:59:49 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15215$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015216if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015218else
Martin v. Löwis11437992002-04-12 09:54:03 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015221 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015222else
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015225
15226int main()
15227{
15228 int val1 = nice(1);
15229 if (val1 != -1 && val1 == nice(2))
15230 exit(0);
15231 exit(1);
15232}
15233
Martin v. Löwis11437992002-04-12 09:54:03 +000015234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015235if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015236 ac_cv_broken_nice=yes
15237else
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15241 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015242fi
15243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244fi
15245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15247$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015248if test "$ac_cv_broken_nice" = yes
15249then
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015252
15253fi
15254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15256$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015257if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015261 ac_cv_broken_poll=no
15262else
Matthias Kloseb9621712010-04-24 17:59:49 +000015263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015264/* end confdefs.h. */
15265
15266#include <poll.h>
15267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015268int main()
15269{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015270 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015271 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015272
15273 close (42);
15274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015275 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015276 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015277 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015278 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015279 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015280 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015281 return 1;
15282}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015283
15284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015285if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015286 ac_cv_broken_poll=yes
15287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015294fi
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15297$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298if test "$ac_cv_broken_poll" = yes
15299then
15300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302
15303fi
15304
Brett Cannon43802422005-02-10 20:48:03 +000015305# 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 +000015306# (which is not required by ISO C or UNIX spec) and/or if we support
15307# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015308ac_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 +000015309#include <$ac_cv_struct_tm>
15310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311"
Victor Stinnere0be4232011-10-25 13:06:09 +020015312if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015313
15314cat >>confdefs.h <<_ACEOF
15315#define HAVE_STRUCT_TM_TM_ZONE 1
15316_ACEOF
15317
15318
15319fi
15320
15321if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015324
15325else
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15327"
Victor Stinnere0be4232011-10-25 13:06:09 +020015328if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330else
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332fi
15333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015335#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336_ACEOF
15337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15339$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015340if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342else
Matthias Kloseb9621712010-04-24 17:59:49 +000015343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015344/* end confdefs.h. */
15345#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346#if !HAVE_DECL_TZNAME
15347extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015348#endif
15349
15350int
15351main ()
15352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015354 ;
15355 return 0;
15356}
15357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015358if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015359 ac_cv_var_tzname=yes
15360else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015363rm -f core conftest.err conftest.$ac_objext \
15364 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15367$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015368 if test $ac_cv_var_tzname = yes; then
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015371
15372 fi
15373fi
15374
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015375
Martin v. Löwis1d459062005-03-14 21:23:33 +000015376# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15378$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015379if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015381else
15382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015384 ac_cv_working_tzset=no
15385else
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015387/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015388
15389#include <stdlib.h>
15390#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015391#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015392
15393#if HAVE_TZNAME
15394extern char *tzname[];
15395#endif
15396
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015397int main()
15398{
Brett Cannon18367812003-09-19 00:59:16 +000015399 /* Note that we need to ensure that not only does tzset(3)
15400 do 'something' with localtime, but it works as documented
15401 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015402 This includes making sure that tzname is set properly if
15403 tm->tm_zone does not exist since it is the alternative way
15404 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015405
15406 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015407 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015408 */
15409
Martin v. Löwis1d459062005-03-14 21:23:33 +000015410 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015411 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15412
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015413 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015414 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015415 if (localtime(&groundhogday)->tm_hour != 0)
15416 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015417#if HAVE_TZNAME
15418 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15419 if (strcmp(tzname[0], "UTC") ||
15420 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15421 exit(1);
15422#endif
Brett Cannon18367812003-09-19 00:59:16 +000015423
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015424 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015425 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015426 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015427 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015428#if HAVE_TZNAME
15429 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15430 exit(1);
15431#endif
Brett Cannon18367812003-09-19 00:59:16 +000015432
15433 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15434 tzset();
15435 if (localtime(&groundhogday)->tm_hour != 11)
15436 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015437#if HAVE_TZNAME
15438 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15439 exit(1);
15440#endif
15441
15442#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015443 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15444 exit(1);
15445 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15446 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015447#endif
Brett Cannon18367812003-09-19 00:59:16 +000015448
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015449 exit(0);
15450}
15451
15452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015454 ac_cv_working_tzset=yes
15455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015460fi
15461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462fi
15463
Matthias Kloseb9621712010-04-24 17:59:49 +000015464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15465$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015466if test "$ac_cv_working_tzset" = yes
15467then
15468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015470
15471fi
15472
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015473# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15475$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015476if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015478else
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015480/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015481#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015482int
15483main ()
15484{
15485
15486struct stat st;
15487st.st_mtim.tv_nsec = 1;
15488
15489 ;
15490 return 0;
15491}
15492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015493if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015494 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015495else
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15499fi
15500
Matthias Kloseb9621712010-04-24 17:59:49 +000015501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15502$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015503if test "$ac_cv_stat_tv_nsec" = yes
15504then
15505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015507
15508fi
15509
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015510# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15512$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015513if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015515else
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015517/* end confdefs.h. */
15518#include <sys/stat.h>
15519int
15520main ()
15521{
15522
15523struct stat st;
15524st.st_mtimespec.tv_nsec = 1;
15525
15526 ;
15527 return 0;
15528}
15529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015531 ac_cv_stat_tv_nsec2=yes
15532else
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15536fi
15537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15539$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015540if test "$ac_cv_stat_tv_nsec2" = yes
15541then
15542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015544
15545fi
15546
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015547# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015548ac_save_cppflags="$CPPFLAGS"
15549CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015550
15551for ac_header in curses.h ncurses.h
15552do :
15553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15554ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15555if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15556 cat >>confdefs.h <<_ACEOF
15557#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15558_ACEOF
15559
15560fi
15561
15562done
15563
15564
15565# On Solaris, term.h requires curses.h
15566for ac_header in term.h
15567do :
15568 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15569#ifdef HAVE_CURSES_H
15570#include <curses.h>
15571#endif
15572
15573"
15574if test "x$ac_cv_header_term_h" = xyes; then :
15575 cat >>confdefs.h <<_ACEOF
15576#define HAVE_TERM_H 1
15577_ACEOF
15578
15579fi
15580
15581done
15582
15583
Jack Jansen666b1e72001-10-31 12:11:48 +000015584# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15586$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015587if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015591/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015592#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015593int
15594main ()
15595{
Jack Jansen666b1e72001-10-31 12:11:48 +000015596
15597 int rtn;
15598 rtn = mvwdelch(0,0,0);
15599
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 ;
15601 return 0;
15602}
15603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015604if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015605 ac_cv_mvwdelch_is_expression=yes
15606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15610fi
15611
Matthias Kloseb9621712010-04-24 17:59:49 +000015612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15613$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015614
15615if test "$ac_cv_mvwdelch_is_expression" = yes
15616then
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Matthias Kloseb9621712010-04-24 17:59:49 +000015618$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015619
15620fi
15621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15623$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015624if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015626else
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015628/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015629#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015630int
15631main ()
15632{
Jack Jansen666b1e72001-10-31 12:11:48 +000015633
15634 WINDOW *w;
15635 w->_flags = 0;
15636
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 ;
15638 return 0;
15639}
15640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015641if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015642 ac_cv_window_has_flags=yes
15643else
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15647fi
15648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15650$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015651
Jack Jansen666b1e72001-10-31 12:11:48 +000015652
15653if test "$ac_cv_window_has_flags" = yes
15654then
Martin v. Löwis11437992002-04-12 09:54:03 +000015655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015657
15658fi
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15661$as_echo_n "checking for is_term_resized... " >&6; }
15662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015663/* end confdefs.h. */
15664#include <curses.h>
15665int
15666main ()
15667{
15668void *x=is_term_resized
15669 ;
15670 return 0;
15671}
15672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015674
Matthias Kloseb9621712010-04-24 17:59:49 +000015675$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015676
Matthias Kloseb159a552010-04-25 21:00:44 +000015677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015678$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15681$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015682
15683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15687$as_echo_n "checking for resize_term... " >&6; }
15688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015689/* end confdefs.h. */
15690#include <curses.h>
15691int
15692main ()
15693{
15694void *x=resize_term
15695 ;
15696 return 0;
15697}
15698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015699if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015700
Matthias Kloseb9621712010-04-24 17:59:49 +000015701$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015702
Matthias Kloseb159a552010-04-25 21:00:44 +000015703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015704$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015705else
Matthias Kloseb9621712010-04-24 17:59:49 +000015706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15707$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015708
15709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15713$as_echo_n "checking for resizeterm... " >&6; }
15714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015715/* end confdefs.h. */
15716#include <curses.h>
15717int
15718main ()
15719{
15720void *x=resizeterm
15721 ;
15722 return 0;
15723}
15724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015725if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015728
Matthias Kloseb159a552010-04-25 21:00:44 +000015729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015730$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15733$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015734
15735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015737# last curses configure check
15738CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015739
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15741$as_echo "$as_me: checking for device files" >&6;}
15742
15743if test "x$cross_compiling" = xyes; then
15744 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15746$as_echo_n "checking for /dev/ptmx... " >&6; }
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15748$as_echo "not set" >&6; }
15749 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15750 fi
15751 if test "${ac_cv_file__dev_ptc+set}" != set; then
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15753$as_echo_n "checking for /dev/ptc... " >&6; }
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15755$as_echo "not set" >&6; }
15756 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15757 fi
15758fi
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15761$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015762if ${ac_cv_file__dev_ptmx+:} false; then :
15763 $as_echo_n "(cached) " >&6
15764else
15765 test "$cross_compiling" = yes &&
15766 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15767if test -r "/dev/ptmx"; then
15768 ac_cv_file__dev_ptmx=yes
15769else
15770 ac_cv_file__dev_ptmx=no
15771fi
15772fi
15773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15774$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15775if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015776
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015777fi
15778
15779if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015782
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15785$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015786if ${ac_cv_file__dev_ptc+:} false; then :
15787 $as_echo_n "(cached) " >&6
15788else
15789 test "$cross_compiling" = yes &&
15790 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15791if test -r "/dev/ptc"; then
15792 ac_cv_file__dev_ptc=yes
15793else
15794 ac_cv_file__dev_ptc=no
15795fi
15796fi
15797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15798$as_echo "$ac_cv_file__dev_ptc" >&6; }
15799if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015800
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015801fi
15802
15803if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015806
Neal Norwitz865400f2003-03-21 01:42:58 +000015807fi
15808
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015809if test "$have_long_long" = yes
15810then
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15812$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015813 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015815else
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015817 ac_cv_have_long_long_format="cross -- assuming no"
15818 if test x$GCC = xyes; then
15819 save_CFLAGS=$CFLAGS
15820 CFLAGS="$CFLAGS -Werror -Wformat"
15821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822/* end confdefs.h. */
15823
15824 #include <stdio.h>
15825 #include <stddef.h>
15826
15827int
15828main ()
15829{
15830
15831 char *buffer;
15832 sprintf(buffer, "%lld", (long long)123);
15833 sprintf(buffer, "%lld", (long long)-123);
15834 sprintf(buffer, "%llu", (unsigned long long)123);
15835
15836 ;
15837 return 0;
15838}
15839_ACEOF
15840if ac_fn_c_try_compile "$LINENO"; then :
15841 ac_cv_have_long_long_format=yes
15842
15843fi
15844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15845 CFLAGS=$save_CFLAGS
15846 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015847else
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015849/* end confdefs.h. */
15850
15851 #include <stdio.h>
15852 #include <stddef.h>
15853 #include <string.h>
15854
15855 #ifdef HAVE_SYS_TYPES_H
15856 #include <sys/types.h>
15857 #endif
15858
15859 int main()
15860 {
15861 char buffer[256];
15862
15863 if (sprintf(buffer, "%lld", (long long)123) < 0)
15864 return 1;
15865 if (strcmp(buffer, "123"))
15866 return 1;
15867
15868 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15869 return 1;
15870 if (strcmp(buffer, "-123"))
15871 return 1;
15872
15873 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15874 return 1;
15875 if (strcmp(buffer, "123"))
15876 return 1;
15877
15878 return 0;
15879 }
15880
15881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015882if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015883 ac_cv_have_long_long_format=yes
15884else
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015889fi
15890
15891
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015892fi
15893
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15895$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015896fi
15897
Mark Dickinson89d7d412009-12-31 20:50:59 +000015898if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015899then
15900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015902
15903fi
15904
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015905if test $ac_sys_system = Darwin
15906then
15907 LIBS="$LIBS -framework CoreFoundation"
15908fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15911$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015912if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015914else
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015916 ac_cv_have_size_t_format="cross -- assuming yes"
15917
Thomas Wouters477c8d52006-05-27 19:21:47 +000015918else
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015920/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015921
Thomas Wouters477c8d52006-05-27 19:21:47 +000015922#include <stdio.h>
15923#include <stddef.h>
15924#include <string.h>
15925
Christian Heimes2c181612007-12-17 20:04:13 +000015926#ifdef HAVE_SYS_TYPES_H
15927#include <sys/types.h>
15928#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015929
15930#ifdef HAVE_SSIZE_T
15931typedef ssize_t Py_ssize_t;
15932#elif SIZEOF_VOID_P == SIZEOF_LONG
15933typedef long Py_ssize_t;
15934#else
15935typedef int Py_ssize_t;
15936#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015937
Christian Heimes2c181612007-12-17 20:04:13 +000015938int main()
15939{
15940 char buffer[256];
15941
Thomas Wouters477c8d52006-05-27 19:21:47 +000015942 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15943 return 1;
15944
Thomas Wouters89f507f2006-12-13 04:49:30 +000015945 if (strcmp(buffer, "123"))
15946 return 1;
15947
15948 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15949 return 1;
15950
15951 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015952 return 1;
15953
15954 return 0;
15955}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015956
Thomas Wouters477c8d52006-05-27 19:21:47 +000015957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015958if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015959 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015960else
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015965fi
15966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15969$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015970if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015973
15974fi
15975
Matthias Kloseb9621712010-04-24 17:59:49 +000015976ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015977#ifdef HAVE_SYS_TYPES_H
15978#include <sys/types.h>
15979#endif
15980#ifdef HAVE_SYS_SOCKET_H
15981#include <sys/socket.h>
15982#endif
15983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984"
Victor Stinnere0be4232011-10-25 13:06:09 +020015985if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015986
Martin v. Löwis11437992002-04-12 09:54:03 +000015987else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015990
15991fi
15992
Michael W. Hudson54241132001-12-07 15:38:26 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15995$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015996if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015997 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015998else
Matthias Kloseb9621712010-04-24 17:59:49 +000015999 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016000 ac_cv_broken_mbstowcs=no
16001else
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016003/* end confdefs.h. */
16004
Stefan Krah19c21392012-11-22 23:47:32 +010016005#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016006#include<stdlib.h>
16007int main() {
16008 size_t len = -1;
16009 const char *str = "text";
16010 len = mbstowcs(NULL, str, 0);
16011 return (len != 4);
16012}
16013
16014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016015if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016016 ac_cv_broken_mbstowcs=no
16017else
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16021 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016022fi
16023
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016024fi
16025
Matthias Kloseb9621712010-04-24 17:59:49 +000016026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16027$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016028if test "$ac_cv_broken_mbstowcs" = yes
16029then
16030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016032
16033fi
16034
Antoine Pitroub52ec782009-01-25 16:34:23 +000016035# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16037$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016038
16039# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016040if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016041 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016042if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016043then
16044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016046
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16048$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016049fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016050if test "$withval" = no
16051then
16052
16053$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16056$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016057fi
16058
Antoine Pitrou042b1282010-08-13 21:15:58 +000016059else
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16061$as_echo "no value specified" >&6; }
16062fi
16063
Antoine Pitroub52ec782009-01-25 16:34:23 +000016064
Matthias Kloseb17289e2012-03-15 19:51:34 +010016065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16066$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16067if ${ac_cv_computed_gotos+:} false; then :
16068 $as_echo_n "(cached) " >&6
16069else
16070 if test "$cross_compiling" = yes; then :
16071 if test "${with_computed_gotos+set}" = set; then
16072 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16073 else
16074 ac_cv_computed_gotos=no
16075 fi
16076else
16077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16078/* end confdefs.h. */
16079
16080int main(int argc, char **argv)
16081{
16082 static void *targets[1] = { &&LABEL1 };
16083 goto LABEL2;
16084LABEL1:
16085 return 0;
16086LABEL2:
16087 goto *targets[0];
16088 return 1;
16089}
16090
16091_ACEOF
16092if ac_fn_c_try_run "$LINENO"; then :
16093 ac_cv_computed_gotos=yes
16094else
16095 ac_cv_computed_gotos=no
16096fi
16097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16098 conftest.$ac_objext conftest.beam conftest.$ac_ext
16099fi
16100
16101fi
16102
16103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16104$as_echo "$ac_cv_computed_gotos" >&6; }
16105case "$ac_cv_computed_gotos" in yes*)
16106
16107$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16108
16109esac
16110
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016111case $ac_sys_system in
16112AIX*)
16113
16114$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16115 ;;
16116esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016117
Michael W. Hudson54241132001-12-07 15:38:26 +000016118
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016119
16120
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016121for h in `(cd $srcdir;echo Python/thread_*.h)`
16122do
16123 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16124done
16125
Michael W. Hudson54241132001-12-07 15:38:26 +000016126
Ned Deily0db50cf2014-07-25 12:41:31 -070016127SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16129$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016130for dir in $SRCDIRS; do
16131 if test ! -d $dir; then
16132 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016133 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016134done
Matthias Kloseb9621712010-04-24 17:59:49 +000016135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16136$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016137
Stefan Krah1919b7e2012-03-21 18:25:23 +010016138# Availability of -O2:
16139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16140$as_echo_n "checking for -O2... " >&6; }
16141saved_cflags="$CFLAGS"
16142CFLAGS="-O2"
16143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16144/* end confdefs.h. */
16145
16146int
16147main ()
16148{
16149
16150
16151 ;
16152 return 0;
16153}
16154_ACEOF
16155if ac_fn_c_try_compile "$LINENO"; then :
16156 have_O2=yes
16157else
16158 have_O2=no
16159fi
16160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16162$as_echo "$have_O2" >&6; }
16163CFLAGS="$saved_cflags"
16164
16165# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16166# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16168$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16169saved_cflags="$CFLAGS"
16170CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16171if test "$have_O2" = no; then
16172 CFLAGS=""
16173fi
16174if test "$cross_compiling" = yes; then :
16175 have_glibc_memmove_bug=undefined
16176else
16177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178/* end confdefs.h. */
16179
16180#include <stdio.h>
16181#include <stdlib.h>
16182#include <string.h>
16183void foo(void *p, void *q) { memmove(p, q, 19); }
16184int main() {
16185 char a[32] = "123456789000000000";
16186 foo(&a[9], a);
16187 if (strcmp(a, "123456789123456789000000000") != 0)
16188 return 1;
16189 foo(a, &a[9]);
16190 if (strcmp(a, "123456789000000000") != 0)
16191 return 1;
16192 return 0;
16193}
16194
16195_ACEOF
16196if ac_fn_c_try_run "$LINENO"; then :
16197 have_glibc_memmove_bug=no
16198else
16199 have_glibc_memmove_bug=yes
16200fi
16201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16202 conftest.$ac_objext conftest.beam conftest.$ac_ext
16203fi
16204
16205CFLAGS="$saved_cflags"
16206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16207$as_echo "$have_glibc_memmove_bug" >&6; }
16208if test "$have_glibc_memmove_bug" = yes; then
16209
16210$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16211
16212fi
16213
16214if test "$have_gcc_asm_for_x87" = yes; then
16215 # Some versions of gcc miscompile inline asm:
16216 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16217 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16218 case $CC in
16219 *gcc*)
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16221$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16222 saved_cflags="$CFLAGS"
16223 CFLAGS="-O2"
16224 if test "$cross_compiling" = yes; then :
16225 have_ipa_pure_const_bug=undefined
16226else
16227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228/* end confdefs.h. */
16229
16230 __attribute__((noinline)) int
16231 foo(int *p) {
16232 int r;
16233 asm ( "movl \$6, (%1)\n\t"
16234 "xorl %0, %0\n\t"
16235 : "=r" (r) : "r" (p) : "memory"
16236 );
16237 return r;
16238 }
16239 int main() {
16240 int p = 8;
16241 if ((foo(&p) ? : p) != 6)
16242 return 1;
16243 return 0;
16244 }
16245
16246_ACEOF
16247if ac_fn_c_try_run "$LINENO"; then :
16248 have_ipa_pure_const_bug=no
16249else
16250 have_ipa_pure_const_bug=yes
16251fi
16252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16253 conftest.$ac_objext conftest.beam conftest.$ac_ext
16254fi
16255
16256 CFLAGS="$saved_cflags"
16257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16258$as_echo "$have_ipa_pure_const_bug" >&6; }
16259 if test "$have_ipa_pure_const_bug" = yes; then
16260
16261$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16262
16263 fi
16264 ;;
16265 esac
16266fi
16267
Victor Stinner4f5366e2015-01-09 02:13:19 +010016268# Check for stdatomic.h
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16270$as_echo_n "checking for stdatomic.h... " >&6; }
16271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272/* end confdefs.h. */
16273
16274
16275 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016276 atomic_int value = ATOMIC_VAR_INIT(1);
16277 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016278 int main() {
16279 int loaded_value = atomic_load(&value);
16280 return 0;
16281 }
16282
16283
16284_ACEOF
16285if ac_fn_c_try_link "$LINENO"; then :
16286 have_stdatomic_h=yes
16287else
16288 have_stdatomic_h=no
16289fi
16290rm -f core conftest.err conftest.$ac_objext \
16291 conftest$ac_exeext conftest.$ac_ext
16292
16293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16294$as_echo "$have_stdatomic_h" >&6; }
16295
16296if test "$have_stdatomic_h" = yes; then
16297
16298$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16299
16300fi
16301
16302# Check for GCC >= 4.7 __atomic builtins
16303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16304$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16306/* end confdefs.h. */
16307
16308
16309 volatile int val = 1;
16310 int main() {
16311 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16312 return 0;
16313 }
16314
16315
16316_ACEOF
16317if ac_fn_c_try_link "$LINENO"; then :
16318 have_builtin_atomic=yes
16319else
16320 have_builtin_atomic=no
16321fi
16322rm -f core conftest.err conftest.$ac_objext \
16323 conftest$ac_exeext conftest.$ac_ext
16324
16325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16326$as_echo "$have_builtin_atomic" >&6; }
16327
16328if test "$have_builtin_atomic" = yes; then
16329
16330$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16331
16332fi
16333
Ned Deily322f5ba2013-11-21 23:01:59 -080016334# ensurepip option
16335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16336$as_echo_n "checking for ensurepip... " >&6; }
16337
16338# Check whether --with-ensurepip was given.
16339if test "${with_ensurepip+set}" = set; then :
16340 withval=$with_ensurepip;
16341else
16342 with_ensurepip=upgrade
16343fi
16344
16345case $with_ensurepip in #(
16346 yes|upgrade) :
16347 ENSUREPIP=upgrade ;; #(
16348 install) :
16349 ENSUREPIP=install ;; #(
16350 no) :
16351 ENSUREPIP=no ;; #(
16352 *) :
16353 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16354esac
16355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16356$as_echo "$ENSUREPIP" >&6; }
16357
16358
Victor Stinner35a97c02015-03-08 02:59:09 +010016359# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16361$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16363/* end confdefs.h. */
16364
16365
16366 #include <dirent.h>
16367
16368 int main() {
16369 struct dirent entry;
16370 return entry.d_type == DT_UNKNOWN;
16371 }
16372
16373
16374_ACEOF
16375if ac_fn_c_try_link "$LINENO"; then :
16376 have_dirent_d_type=yes
16377else
16378 have_dirent_d_type=no
16379fi
16380rm -f core conftest.err conftest.$ac_objext \
16381 conftest$ac_exeext conftest.$ac_ext
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16383$as_echo "$have_dirent_d_type" >&6; }
16384
16385if test "$have_dirent_d_type" = yes; then
16386
16387$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16388
16389fi
16390
Victor Stinner9eb57c52015-03-19 22:21:49 +010016391# check if the Linux getrandom() syscall is available
16392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16393$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395/* end confdefs.h. */
16396
16397
Victor Stinner1b80b242016-04-12 22:34:58 +020016398 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016399 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016400 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016401
16402 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016403 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016404 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016405 const int flags = GRND_NONBLOCK;
16406 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016407 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016408 return 0;
16409 }
16410
16411
16412_ACEOF
16413if ac_fn_c_try_link "$LINENO"; then :
16414 have_getrandom_syscall=yes
16415else
16416 have_getrandom_syscall=no
16417fi
16418rm -f core conftest.err conftest.$ac_objext \
16419 conftest$ac_exeext conftest.$ac_ext
16420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16421$as_echo "$have_getrandom_syscall" >&6; }
16422
16423if test "$have_getrandom_syscall" = yes; then
16424
16425$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16426
16427fi
16428
Victor Stinner3abf44e2015-09-18 15:38:37 +020016429# check if the getrandom() function is available
16430# the test was written for the Solaris function of <sys/random.h>
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16432$as_echo_n "checking for the getrandom() function... " >&6; }
16433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16434/* end confdefs.h. */
16435
16436
16437 #include <sys/random.h>
16438
16439 int main() {
16440 char buffer[1];
16441 const size_t buflen = sizeof(buffer);
16442 const int flags = 0;
16443 /* ignore the result, Python checks for ENOSYS at runtime */
16444 (void)getrandom(buffer, buflen, flags);
16445 return 0;
16446 }
16447
16448
16449_ACEOF
16450if ac_fn_c_try_link "$LINENO"; then :
16451 have_getrandom=yes
16452else
16453 have_getrandom=no
16454fi
16455rm -f core conftest.err conftest.$ac_objext \
16456 conftest$ac_exeext conftest.$ac_ext
16457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16458$as_echo "$have_getrandom" >&6; }
16459
16460if test "$have_getrandom" = yes; then
16461
16462$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16463
16464fi
16465
Guido van Rossum627b2d71993-12-24 10:39:16 +000016466# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016467ac_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 +000016468
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016469ac_config_files="$ac_config_files Modules/ld_so_aix"
16470
Martin v. Löwis11437992002-04-12 09:54:03 +000016471cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016472# This file is a shell script that caches the results of configure
16473# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016474# scripts and configure runs, see configure's option --config-cache.
16475# It is not useful on other systems. If it contains results you don't
16476# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016477#
Martin v. Löwis11437992002-04-12 09:54:03 +000016478# config.status only pays attention to the cache file if you give it
16479# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016480#
Skip Montanaro6dead952003-09-25 14:50:04 +000016481# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016482# loading this file, other *unset* `ac_cv_foo' will be assigned the
16483# following values.
16484
16485_ACEOF
16486
Guido van Rossumf78abae1997-01-21 22:02:36 +000016487# The following way of writing the cache mishandles newlines in values,
16488# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016489# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016490# Ultrix sh set writes to stderr and can't be redirected directly,
16491# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492(
16493 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16494 eval ac_val=\$$ac_var
16495 case $ac_val in #(
16496 *${as_nl}*)
16497 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16499$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500 esac
16501 case $ac_var in #(
16502 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016503 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16504 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016505 esac ;;
16506 esac
16507 done
16508
Martin v. Löwis11437992002-04-12 09:54:03 +000016509 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16511 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 # `set' does not quote correctly, so add quotes: double-quote
16513 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016515 "s/'/'\\\\''/g;
16516 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 *)
16519 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 esac |
16523 sort
16524) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16530 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16532 :end' >>confcache
16533if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16534 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016535 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16537$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016538 if test ! -f "$cache_file" || test -h "$cache_file"; then
16539 cat confcache >"$cache_file"
16540 else
16541 case $cache_file in #(
16542 */* | ?:*)
16543 mv -f confcache "$cache_file"$$ &&
16544 mv -f "$cache_file"$$ "$cache_file" ;; #(
16545 *)
16546 mv -f confcache "$cache_file" ;;
16547 esac
16548 fi
16549 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016550 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016551 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16552$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016553 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016554fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016555rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016557test "x$prefix" = xNONE && prefix=$ac_default_prefix
16558# Let make expand exec_prefix.
16559test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016560
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016561DEFS=-DHAVE_CONFIG_H
16562
Skip Montanaro6dead952003-09-25 14:50:04 +000016563ac_libobjs=
16564ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016565U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016566for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16567 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16571 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016572 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16573 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016574done
16575LIBOBJS=$ac_libobjs
16576
16577LTLIBOBJS=$ac_ltlibobjs
16578
16579
Martin v. Löwis11437992002-04-12 09:54:03 +000016580
Matthias Kloseb9621712010-04-24 17:59:49 +000016581
Victor Stinnere0be4232011-10-25 13:06:09 +020016582: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016583ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016584ac_clean_files_save=$ac_clean_files
16585ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016586{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16587$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16588as_write_fail=0
16589cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016590#! $SHELL
16591# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016592# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016593# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016594# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016595
Martin v. Löwis11437992002-04-12 09:54:03 +000016596debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016597ac_cs_recheck=false
16598ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016599
Matthias Kloseb9621712010-04-24 17:59:49 +000016600SHELL=\${CONFIG_SHELL-$SHELL}
16601export SHELL
16602_ASEOF
16603cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16604## -------------------- ##
16605## M4sh Initialization. ##
16606## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608# Be more Bourne compatible
16609DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016610if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016611 emulate sh
16612 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016613 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016614 # is contrary to our usage. Disable this feature.
16615 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016617else
Matthias Kloseb9621712010-04-24 17:59:49 +000016618 case `(set -o) 2>/dev/null` in #(
16619 *posix*) :
16620 set -o posix ;; #(
16621 *) :
16622 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016624fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016625
16626
Matthias Kloseb9621712010-04-24 17:59:49 +000016627as_nl='
16628'
16629export as_nl
16630# Printing a long string crashes Solaris 7 /usr/bin/printf.
16631as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16632as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16633as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16634# Prefer a ksh shell builtin over an external printf program on Solaris,
16635# but without wasting forks for bash or zsh.
16636if test -z "$BASH_VERSION$ZSH_VERSION" \
16637 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16638 as_echo='print -r --'
16639 as_echo_n='print -rn --'
16640elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16641 as_echo='printf %s\n'
16642 as_echo_n='printf %s'
16643else
16644 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16645 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16646 as_echo_n='/usr/ucb/echo -n'
16647 else
16648 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16649 as_echo_n_body='eval
16650 arg=$1;
16651 case $arg in #(
16652 *"$as_nl"*)
16653 expr "X$arg" : "X\\(.*\\)$as_nl";
16654 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16655 esac;
16656 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16657 '
16658 export as_echo_n_body
16659 as_echo_n='sh -c $as_echo_n_body as_echo'
16660 fi
16661 export as_echo_body
16662 as_echo='sh -c $as_echo_body as_echo'
16663fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016664
16665# The user is always right.
16666if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 PATH_SEPARATOR=:
16668 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16669 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16670 PATH_SEPARATOR=';'
16671 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674
16675# IFS
16676# We need space, tab and new line, in precisely that order. Quoting is
16677# there to prevent editors from complaining about space-tab.
16678# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16679# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680IFS=" "" $as_nl"
16681
16682# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016683as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016684case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685 *[\\/]* ) as_myself=$0 ;;
16686 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016687for as_dir in $PATH
16688do
16689 IFS=$as_save_IFS
16690 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16692 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 ;;
16696esac
16697# We did not find ourselves, most probably we were run as `sh COMMAND'
16698# in which case we are not to be found in the path.
16699if test "x$as_myself" = x; then
16700 as_myself=$0
16701fi
16702if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16704 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705fi
16706
Matthias Kloseb9621712010-04-24 17:59:49 +000016707# Unset variables that we do not need and which cause bugs (e.g. in
16708# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16709# suppresses any "Segmentation fault" message there. '((' could
16710# trigger a bug in pdksh 5.2.14.
16711for as_var in BASH_ENV ENV MAIL MAILPATH
16712do eval test x\${$as_var+set} = xset \
16713 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714done
16715PS1='$ '
16716PS2='> '
16717PS4='+ '
16718
16719# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016720LC_ALL=C
16721export LC_ALL
16722LANGUAGE=C
16723export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724
Matthias Kloseb9621712010-04-24 17:59:49 +000016725# CDPATH.
16726(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16727
16728
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016729# as_fn_error STATUS ERROR [LINENO LOG_FD]
16730# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016731# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16732# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016733# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016734as_fn_error ()
16735{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016736 as_status=$1; test $as_status -eq 0 && as_status=1
16737 if test "$4"; then
16738 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16739 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016741 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016742 as_fn_exit $as_status
16743} # as_fn_error
16744
16745
16746# as_fn_set_status STATUS
16747# -----------------------
16748# Set $? to STATUS, without forking.
16749as_fn_set_status ()
16750{
16751 return $1
16752} # as_fn_set_status
16753
16754# as_fn_exit STATUS
16755# -----------------
16756# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16757as_fn_exit ()
16758{
16759 set +e
16760 as_fn_set_status $1
16761 exit $1
16762} # as_fn_exit
16763
16764# as_fn_unset VAR
16765# ---------------
16766# Portably unset VAR.
16767as_fn_unset ()
16768{
16769 { eval $1=; unset $1;}
16770}
16771as_unset=as_fn_unset
16772# as_fn_append VAR VALUE
16773# ----------------------
16774# Append the text in VALUE to the end of the definition contained in VAR. Take
16775# advantage of any shell optimizations that allow amortized linear growth over
16776# repeated appends, instead of the typical quadratic growth present in naive
16777# implementations.
16778if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16779 eval 'as_fn_append ()
16780 {
16781 eval $1+=\$2
16782 }'
16783else
16784 as_fn_append ()
16785 {
16786 eval $1=\$$1\$2
16787 }
16788fi # as_fn_append
16789
16790# as_fn_arith ARG...
16791# ------------------
16792# Perform arithmetic evaluation on the ARGs, and store the result in the
16793# global $as_val. Take advantage of shells that can avoid forks. The arguments
16794# must be portable across $(()) and expr.
16795if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16796 eval 'as_fn_arith ()
16797 {
16798 as_val=$(( $* ))
16799 }'
16800else
16801 as_fn_arith ()
16802 {
16803 as_val=`expr "$@" || test $? -eq 1`
16804 }
16805fi # as_fn_arith
16806
16807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808if expr a : '\(a\)' >/dev/null 2>&1 &&
16809 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16810 as_expr=expr
16811else
16812 as_expr=false
16813fi
16814
16815if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16816 as_basename=basename
16817else
16818 as_basename=false
16819fi
16820
Matthias Kloseb9621712010-04-24 17:59:49 +000016821if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16822 as_dirname=dirname
16823else
16824 as_dirname=false
16825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827as_me=`$as_basename -- "$0" ||
16828$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16829 X"$0" : 'X\(//\)$' \| \
16830 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016831$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832 sed '/^.*\/\([^/][^/]*\)\/*$/{
16833 s//\1/
16834 q
16835 }
16836 /^X\/\(\/\/\)$/{
16837 s//\1/
16838 q
16839 }
16840 /^X\/\(\/\).*/{
16841 s//\1/
16842 q
16843 }
16844 s/.*/./; q'`
16845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846# Avoid depending upon Character Ranges.
16847as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16848as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16849as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16850as_cr_digits='0123456789'
16851as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016852
16853ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016854case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016856 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016858 xy) ECHO_C='\c';;
16859 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16860 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861 esac;;
16862*)
16863 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016865
Martin v. Löwis11437992002-04-12 09:54:03 +000016866rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867if test -d conf$$.dir; then
16868 rm -f conf$$.dir/conf$$.file
16869else
16870 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016871 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016873if (echo >conf$$.file) 2>/dev/null; then
16874 if ln -s conf$$.file conf$$ 2>/dev/null; then
16875 as_ln_s='ln -s'
16876 # ... but there are two gotchas:
16877 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16878 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016879 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016881 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016882 elif ln conf$$.file conf$$ 2>/dev/null; then
16883 as_ln_s=ln
16884 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016885 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016887else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016888 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16891rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016892
Matthias Kloseb9621712010-04-24 17:59:49 +000016893
16894# as_fn_mkdir_p
16895# -------------
16896# Create "$as_dir" as a directory, including parents if necessary.
16897as_fn_mkdir_p ()
16898{
16899
16900 case $as_dir in #(
16901 -*) as_dir=./$as_dir;;
16902 esac
16903 test -d "$as_dir" || eval $as_mkdir_p || {
16904 as_dirs=
16905 while :; do
16906 case $as_dir in #(
16907 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16908 *) as_qdir=$as_dir;;
16909 esac
16910 as_dirs="'$as_qdir' $as_dirs"
16911 as_dir=`$as_dirname -- "$as_dir" ||
16912$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16913 X"$as_dir" : 'X\(//\)[^/]' \| \
16914 X"$as_dir" : 'X\(//\)$' \| \
16915 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16916$as_echo X"$as_dir" |
16917 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16918 s//\1/
16919 q
16920 }
16921 /^X\(\/\/\)[^/].*/{
16922 s//\1/
16923 q
16924 }
16925 /^X\(\/\/\)$/{
16926 s//\1/
16927 q
16928 }
16929 /^X\(\/\).*/{
16930 s//\1/
16931 q
16932 }
16933 s/.*/./; q'`
16934 test -d "$as_dir" && break
16935 done
16936 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016937 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016938
16939
16940} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016941if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016943else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016944 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016945 as_mkdir_p=false
16946fi
16947
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016948
16949# as_fn_executable_p FILE
16950# -----------------------
16951# Test if FILE is an executable regular file.
16952as_fn_executable_p ()
16953{
16954 test -f "$1" && test -x "$1"
16955} # as_fn_executable_p
16956as_test_x='test -x'
16957as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016958
16959# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016960as_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 +000016961
16962# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016963as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016964
16965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016967## ----------------------------------- ##
16968## Main body of $CONFIG_STATUS script. ##
16969## ----------------------------------- ##
16970_ASEOF
16971test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016972
Matthias Kloseb9621712010-04-24 17:59:49 +000016973cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16974# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016975# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976# values after options handling.
16977ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016978This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016979generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
16981 CONFIG_FILES = $CONFIG_FILES
16982 CONFIG_HEADERS = $CONFIG_HEADERS
16983 CONFIG_LINKS = $CONFIG_LINKS
16984 CONFIG_COMMANDS = $CONFIG_COMMANDS
16985 $ $0 $@
16986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987on `(hostname || uname -n) 2>/dev/null | sed 1q`
16988"
16989
Martin v. Löwis11437992002-04-12 09:54:03 +000016990_ACEOF
16991
Matthias Kloseb9621712010-04-24 17:59:49 +000016992case $ac_config_files in *"
16993"*) set x $ac_config_files; shift; ac_config_files=$*;;
16994esac
16995
16996case $ac_config_headers in *"
16997"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16998esac
16999
17000
17001cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017002# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017003config_files="$ac_config_files"
17004config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017007
Matthias Kloseb9621712010-04-24 17:59:49 +000017008cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017009ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017010\`$as_me' instantiates files and other configuration actions
17011from templates according to the current configuration. Unless the files
17012and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
Matthias Kloseb9621712010-04-24 17:59:49 +000017014Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017015
17016 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017018 --config print configuration, then exit
17019 -q, --quiet, --silent
17020 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 -d, --debug don't remove temporary files
17022 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 --file=FILE[:TEMPLATE]
17024 instantiate the configuration file FILE
17025 --header=FILE[:TEMPLATE]
17026 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
17028Configuration files:
17029$config_files
17030
17031Configuration headers:
17032$config_headers
17033
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017034Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017037cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17038ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017039ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017040python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017041configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017042 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017043
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017044Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017045This config.status script is free software; the Free Software Foundation
17046gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047
17048ac_pwd='$ac_pwd'
17049srcdir='$srcdir'
17050INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017051MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017052test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017053_ACEOF
17054
Matthias Kloseb9621712010-04-24 17:59:49 +000017055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17056# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017057ac_need_defaults=:
17058while test $# != 0
17059do
17060 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017061 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017062 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17063 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017064 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017065 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017066 --*=)
17067 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17068 ac_optarg=
17069 ac_shift=:
17070 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017072 ac_option=$1
17073 ac_optarg=$2
17074 ac_shift=shift
17075 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 esac
17077
Skip Montanaro6dead952003-09-25 14:50:04 +000017078 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017080 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17081 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 $as_echo "$ac_cs_version"; exit ;;
17084 --config | --confi | --conf | --con | --co | --c )
17085 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 debug=: ;;
17088 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017089 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017090 case $ac_optarg in
17091 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017092 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017093 esac
17094 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 ac_need_defaults=false;;
17096 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017097 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017098 case $ac_optarg in
17099 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17100 esac
17101 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 --he | --h)
17104 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017105 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017106Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017108 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017109 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17110 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17111 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017112
17113 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017115Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017116
Matthias Kloseb9621712010-04-24 17:59:49 +000017117 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017119
17120 esac
17121 shift
17122done
17123
Skip Montanaro6dead952003-09-25 14:50:04 +000017124ac_configure_extra_args=
17125
17126if $ac_cs_silent; then
17127 exec 6>/dev/null
17128 ac_configure_extra_args="$ac_configure_extra_args --silent"
17129fi
17130
17131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017133if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017134 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017135 shift
17136 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17137 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017140fi
17141
Martin v. Löwis11437992002-04-12 09:54:03 +000017142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017143cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144exec 5>>config.log
17145{
17146 echo
17147 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17148## Running $as_me. ##
17149_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017156
Matthias Kloseb9621712010-04-24 17:59:49 +000017157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158
17159# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017160for ac_config_target in $ac_config_targets
17161do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162 case $ac_config_target in
17163 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17164 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17165 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017166 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17167 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17169 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017170 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017171 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017172 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173
Victor Stinnere0be4232011-10-25 13:06:09 +020017174 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 esac
17176done
17177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178
Martin v. Löwis11437992002-04-12 09:54:03 +000017179# If the user did not use the arguments to specify the items to instantiate,
17180# then the envvar interface is used. Set only those that are not.
17181# We use the long form for the default assignment because of an extremely
17182# bizarre bug on SunOS 4.1.3.
17183if $ac_need_defaults; then
17184 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17185 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17186fi
17187
Skip Montanaro6dead952003-09-25 14:50:04 +000017188# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017190# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191# Hook for its removal unless debugging.
17192# Note that there is a small window in which the directory will not be cleaned:
17193# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017194$debug ||
17195{
Victor Stinnere0be4232011-10-25 13:06:09 +020017196 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017198 : "${ac_tmp:=$tmp}"
17199 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017201 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017202}
Martin v. Löwis11437992002-04-12 09:54:03 +000017203# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017204
Martin v. Löwis11437992002-04-12 09:54:03 +000017205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017207 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017208} ||
17209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210 tmp=./conf$$-$RANDOM
17211 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017212} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017213ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017214
Matthias Kloseb9621712010-04-24 17:59:49 +000017215# Set up the scripts for CONFIG_FILES section.
17216# No need to generate them if there are no CONFIG_FILES.
17217# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017219
Matthias Kloseb9621712010-04-24 17:59:49 +000017220
17221ac_cr=`echo X | tr X '\015'`
17222# On cygwin, bash can eat \r inside `` if the user requested igncr.
17223# But we know of no other shell where ac_cr would be empty at this
17224# point, so we can use a bashism as a fallback.
17225if test "x$ac_cr" = x; then
17226 eval ac_cr=\$\'\\r\'
17227fi
17228ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17229if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017230 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017231else
17232 ac_cs_awk_cr=$ac_cr
17233fi
17234
Victor Stinnere0be4232011-10-25 13:06:09 +020017235echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017236_ACEOF
17237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238
Matthias Kloseb9621712010-04-24 17:59:49 +000017239{
17240 echo "cat >conf$$subs.awk <<_ACEOF" &&
17241 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17242 echo "_ACEOF"
17243} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017244 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17245ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246ac_delim='%!_!# '
17247for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017248 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017249 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250
Matthias Kloseb9621712010-04-24 17:59:49 +000017251 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17252 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253 break
17254 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017255 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256 else
17257 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017258 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259done
Matthias Kloseb9621712010-04-24 17:59:49 +000017260rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261
Matthias Kloseb9621712010-04-24 17:59:49 +000017262cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017263cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017265sed -n '
17266h
17267s/^/S["/; s/!.*/"]=/
17268p
17269g
17270s/^[^!]*!//
17271:repl
17272t repl
17273s/'"$ac_delim"'$//
17274t delim
17275:nl
17276h
17277s/\(.\{148\}\)..*/\1/
17278t more1
17279s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17280p
17281n
17282b repl
17283:more1
17284s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17285p
17286g
17287s/.\{148\}//
17288t nl
17289:delim
17290h
17291s/\(.\{148\}\)..*/\1/
17292t more2
17293s/["\\]/\\&/g; s/^/"/; s/$/"/
17294p
17295b
17296:more2
17297s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17298p
17299g
17300s/.\{148\}//
17301t delim
17302' <conf$$subs.awk | sed '
17303/^[^""]/{
17304 N
17305 s/\n//
17306}
17307' >>$CONFIG_STATUS || ac_write_fail=1
17308rm -f conf$$subs.awk
17309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17310_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017311cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017312 for (key in S) S_is_set[key] = 1
17313 FS = ""
17314
17315}
17316{
17317 line = $ 0
17318 nfields = split(line, field, "@")
17319 substed = 0
17320 len = length(field[1])
17321 for (i = 2; i < nfields; i++) {
17322 key = field[i]
17323 keylen = length(key)
17324 if (S_is_set[key]) {
17325 value = S[key]
17326 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17327 len += length(value) + length(field[++i])
17328 substed = 1
17329 } else
17330 len += 1 + keylen
17331 }
17332
17333 print line
17334}
17335
17336_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17339if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17340 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17341else
17342 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017343fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017344 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017345_ACEOF
17346
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017347# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17348# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349# trailing colons and then remove the whole line if VPATH becomes empty
17350# (actually we leave an empty line to preserve line numbers).
17351if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017352 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17353h
17354s///
17355s/^/:/
17356s/[ ]*$/:/
17357s/:\$(srcdir):/:/g
17358s/:\${srcdir}:/:/g
17359s/:@srcdir@:/:/g
17360s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017362x
17363s/\(=[ ]*\).*/\1/
17364G
17365s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366s/^[^=]*=[ ]*$//
17367}'
17368fi
17369
Matthias Kloseb9621712010-04-24 17:59:49 +000017370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017371fi # test -n "$CONFIG_FILES"
17372
Matthias Kloseb9621712010-04-24 17:59:49 +000017373# Set up the scripts for CONFIG_HEADERS section.
17374# No need to generate them if there are no CONFIG_HEADERS.
17375# This happens for instance with `./config.status Makefile'.
17376if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017377cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017378BEGIN {
17379_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380
Matthias Kloseb9621712010-04-24 17:59:49 +000017381# Transform confdefs.h into an awk script `defines.awk', embedded as
17382# here-document in config.status, that substitutes the proper values into
17383# config.h.in to produce config.h.
17384
17385# Create a delimiter string that does not exist in confdefs.h, to ease
17386# handling of long lines.
17387ac_delim='%!_!# '
17388for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017389 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17390 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 break
17392 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017393 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017394 else
17395 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17396 fi
17397done
17398
17399# For the awk script, D is an array of macro values keyed by name,
17400# likewise P contains macro parameters if any. Preserve backslash
17401# newline sequences.
17402
17403ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17404sed -n '
17405s/.\{148\}/&'"$ac_delim"'/g
17406t rset
17407:rset
17408s/^[ ]*#[ ]*define[ ][ ]*/ /
17409t def
17410d
17411:def
17412s/\\$//
17413t bsnl
17414s/["\\]/\\&/g
17415s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17416D["\1"]=" \3"/p
17417s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17418d
17419:bsnl
17420s/["\\]/\\&/g
17421s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17422D["\1"]=" \3\\\\\\n"\\/p
17423t cont
17424s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17425t cont
17426d
17427:cont
17428n
17429s/.\{148\}/&'"$ac_delim"'/g
17430t clear
17431:clear
17432s/\\$//
17433t bsnlc
17434s/["\\]/\\&/g; s/^/"/; s/$/"/p
17435d
17436:bsnlc
17437s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17438b cont
17439' <confdefs.h | sed '
17440s/'"$ac_delim"'/"\\\
17441"/g' >>$CONFIG_STATUS || ac_write_fail=1
17442
17443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17444 for (key in D) D_is_set[key] = 1
17445 FS = ""
17446}
17447/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17448 line = \$ 0
17449 split(line, arg, " ")
17450 if (arg[1] == "#") {
17451 defundef = arg[2]
17452 mac1 = arg[3]
17453 } else {
17454 defundef = substr(arg[1], 2)
17455 mac1 = arg[2]
17456 }
17457 split(mac1, mac2, "(") #)
17458 macro = mac2[1]
17459 prefix = substr(line, 1, index(line, defundef) - 1)
17460 if (D_is_set[macro]) {
17461 # Preserve the white space surrounding the "#".
17462 print prefix "define", macro P[macro] D[macro]
17463 next
17464 } else {
17465 # Replace #undef with comments. This is necessary, for example,
17466 # in the case of _POSIX_SOURCE, which is predefined and required
17467 # on some systems where configure will not decide to define it.
17468 if (defundef == "undef") {
17469 print "/*", prefix defundef, macro, "*/"
17470 next
17471 }
17472 }
17473}
17474{ print }
17475_ACAWK
17476_ACEOF
17477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017478 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017479fi # test -n "$CONFIG_HEADERS"
17480
17481
17482eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17483shift
17484for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485do
17486 case $ac_tag in
17487 :[FHLC]) ac_mode=$ac_tag; continue;;
17488 esac
17489 case $ac_mode$ac_tag in
17490 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017491 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492 :[FH]-) ac_tag=-:-;;
17493 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17494 esac
17495 ac_save_IFS=$IFS
17496 IFS=:
17497 set x $ac_tag
17498 IFS=$ac_save_IFS
17499 shift
17500 ac_file=$1
17501 shift
17502
17503 case $ac_mode in
17504 :L) ac_source=$1;;
17505 :[FH])
17506 ac_file_inputs=
17507 for ac_f
17508 do
17509 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017510 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 *) # Look for the file first in the build tree, then in the source tree
17512 # (if the path is not absolute). The absolute path cannot be DOS-style,
17513 # because $ac_f cannot contain `:'.
17514 test -f "$ac_f" ||
17515 case $ac_f in
17516 [\\/$]*) false;;
17517 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17518 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017519 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017521 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17522 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523 done
17524
17525 # Let's still pretend it is `configure' which instantiates (i.e., don't
17526 # use $as_me), people would be surprised to read:
17527 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 configure_input='Generated from '`
17529 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17530 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531 if test x"$ac_file" != x-; then
17532 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17534$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017536 # Neutralize special characters interpreted by sed in replacement strings.
17537 case $configure_input in #(
17538 *\&* | *\|* | *\\* )
17539 ac_sed_conf_input=`$as_echo "$configure_input" |
17540 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17541 *) ac_sed_conf_input=$configure_input;;
17542 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543
17544 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017545 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17546 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 esac
17548 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017549 esac
17550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017552$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017553 X"$ac_file" : 'X\(//\)[^/]' \| \
17554 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017556$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17558 s//\1/
17559 q
17560 }
17561 /^X\(\/\/\)[^/].*/{
17562 s//\1/
17563 q
17564 }
17565 /^X\(\/\/\)$/{
17566 s//\1/
17567 q
17568 }
17569 /^X\(\/\).*/{
17570 s//\1/
17571 q
17572 }
17573 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 ac_builddir=.
17576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577case "$ac_dir" in
17578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17579*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 case $ac_top_builddir_sub in
17584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17586 esac ;;
17587esac
17588ac_abs_top_builddir=$ac_pwd
17589ac_abs_builddir=$ac_pwd$ac_dir_suffix
17590# for backward compatibility:
17591ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017592
17593case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017595 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596 ac_top_srcdir=$ac_top_builddir_sub
17597 ac_abs_top_srcdir=$ac_pwd ;;
17598 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017599 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600 ac_top_srcdir=$srcdir
17601 ac_abs_top_srcdir=$srcdir ;;
17602 *) # Relative name.
17603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17604 ac_top_srcdir=$ac_top_build_prefix$srcdir
17605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017606esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017608
Martin v. Löwis11437992002-04-12 09:54:03 +000017609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017610 case $ac_mode in
17611 :F)
17612 #
17613 # CONFIG_FILE
17614 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017615
17616 case $INSTALL in
17617 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017620 ac_MKDIR_P=$MKDIR_P
17621 case $MKDIR_P in
17622 [\\/$]* | ?:[\\/]* ) ;;
17623 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17624 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017625_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626
Matthias Kloseb9621712010-04-24 17:59:49 +000017627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628# If the template does not know about datarootdir, expand it.
17629# FIXME: This hack should be removed a few years after 2.60.
17630ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017631ac_sed_dataroot='
17632/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 p
17634 q
17635}
17636/@datadir@/p
17637/@docdir@/p
17638/@infodir@/p
17639/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017640/@mandir@/p'
17641case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642*datarootdir*) ac_datarootdir_seen=yes;;
17643*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17645$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017647cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648 ac_datarootdir_hack='
17649 s&@datadir@&$datadir&g
17650 s&@docdir@&$docdir&g
17651 s&@infodir@&$infodir&g
17652 s&@localedir@&$localedir&g
17653 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017654 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655esac
17656_ACEOF
17657
17658# Neutralize VPATH when `$srcdir' = `.'.
17659# Shell code in configure.ac might set extrasub.
17660# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017661cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17662ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017663$extrasub
17664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017666:t
17667/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017668s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017670s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671s&@srcdir@&$ac_srcdir&;t t
17672s&@abs_srcdir@&$ac_abs_srcdir&;t t
17673s&@top_srcdir@&$ac_top_srcdir&;t t
17674s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17675s&@builddir@&$ac_builddir&;t t
17676s&@abs_builddir@&$ac_abs_builddir&;t t
17677s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17678s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017679s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017681"
Victor Stinnere0be4232011-10-25 13:06:09 +020017682eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17683 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017686 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17687 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17688 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017690which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017691$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017692which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017693
Victor Stinnere0be4232011-10-25 13:06:09 +020017694 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017695 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017696 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17697 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017698 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017699 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700 ;;
17701 :H)
17702 #
17703 # CONFIG_HEADER
17704 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017705 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017706 {
17707 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017708 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17709 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017710 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017711 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017712 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17713$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017716 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017717 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017718 fi
17719 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017720 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017721 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017722 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017723 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726
17727 esac
17728
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017729
17730 case $ac_file$ac_mode in
17731 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17732
17733 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734done # for ac_tag
17735
Guido van Rossum627b2d71993-12-24 10:39:16 +000017736
Matthias Kloseb9621712010-04-24 17:59:49 +000017737as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017738_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017739ac_clean_files=$ac_clean_files_save
17740
Matthias Kloseb9621712010-04-24 17:59:49 +000017741test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017742 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017743
Martin v. Löwis11437992002-04-12 09:54:03 +000017744
17745# configure is writing to config.log, and then calls config.status.
17746# config.status does its own redirection, appending to config.log.
17747# Unfortunately, on DOS this fails, as config.log is still kept open
17748# by configure, so config.status won't be able to write to it; its
17749# output is simply discarded. So we exec the FD to /dev/null,
17750# effectively closing config.log, so it can be properly (re)opened and
17751# appended to by config.status. When coming back to configure, we
17752# need to make the FD available again.
17753if test "$no_create" != yes; then
17754 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017755 ac_config_status_args=
17756 test "$silent" = yes &&
17757 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017759 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 exec 5>>config.log
17761 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17762 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017763 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017764fi
17765if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17767$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017768fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017769
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017770
Christian Heimes75ed8902013-11-20 01:11:18 +010017771echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017772if test ! -f Modules/Setup
17773then
17774 cp $srcdir/Modules/Setup.dist Modules/Setup
17775fi
17776
Christian Heimes75ed8902013-11-20 01:11:18 +010017777echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017778if test ! -f Modules/Setup.local
17779then
17780 echo "# Edit this file for local setup changes" >Modules/Setup.local
17781fi
17782
Christian Heimes75ed8902013-11-20 01:11:18 +010017783echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017784$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17785 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017786 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017787mv config.c Modules